2

我需要将 Logger 名称放入每个日志中。现在我用

logger.error(logger.getName());.

有没有更好的办法?我不想在%m这里使用。

4

1 回答 1

4

您可以在日志记录文本中使用%c 选项

于 2012-08-08T09:27:00.080 回答