Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 Logger 名称放入每个日志中。现在我用
logger.error(logger.getName());.
logger.error(logger.getName());
有没有更好的办法?我不想在%m这里使用。
%m
您可以在日志记录文本中使用%c 选项。