In UTBot we use loggers like the following one:
val logger = Logger.getInstance(CodeGenerator::class.java)
Instead of sending loggers output in the standard stream or a file, we can put them right into IntelliJ IDEA. So, let`s do it then! 😃
- In UTBot repository find Gradle > Tasks > intellij > runIde and choose it with the right button click
- Select Modify Run Configuration... item, and then Modify options > Specify logs to be shown in console
- Click ➕ and add new Idea log file (or choose any name you want for it 😉) in the Log files to be shown in console section
- Restart the 'runIde' task, check that the new tab is present in your IDE
- And we`re done! 😃 Narrow logging messages to the loggers you are interested in
If you want to use the existing loggers in UTBot or you`re a contributor and you have your own loggers to add, please watch this article to know how to do it in a better way.