Created
July 20, 2017 07:53
-
-
Save A-pZ/05343384eb03370605ebd3bddbe7506c to your computer and use it in GitHub Desktop.
Log4j2.8を使った、ログレベルチェック不要になるログ出力
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@Log4j2 | |
public String index() throws MessagingException { | |
MailForm form = new MailForm("[email protected]", "[email protected]", "タイトル", "ここに本文が入ります"); | |
String result = generateMailText(form); | |
log.info("mailtext {}" , () -> result.toString()); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment