Skip to content

Commit e7cf736

Browse files
authored
Logging.md (#310)
Create Logging.md
1 parent 1728ec0 commit e7cf736

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

EnableLogging.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# How to enable UTBot logging in IntelliJ IDEA
2+
3+
In UTBot we use loggers like the following one:
4+
5+
6+
`val logger = Logger.getInstance(CodeGenerator::class.java)`
7+
8+
9+
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! 😃
10+
11+
12+
1. In UTBot repository find Gradle > Tasks > intellij > runIde and choose it with the right button click
13+
14+
![image](https://user-images.githubusercontent.com/106974353/175880783-57a190f1-283d-448f-984b-8acd62af657c.png)
15+
16+
17+
2. Select Modify Run Configuration... item, and then Modify options > Specify logs to be shown in console
18+
19+
![image](https://user-images.githubusercontent.com/106974353/175881032-944bc31a-bd13-43c1-9ebf-e2b542984b7d.png)
20+
21+
22+
3. 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
23+
24+
![image](https://user-images.githubusercontent.com/106974353/175881081-4612493b-a8fb-4c5b-b3b2-edaa4bea0703.png)
25+
26+
27+
4. Restart the 'runIde' task, check that the new tab is present in your IDE
28+
29+
![image](https://user-images.githubusercontent.com/106974353/175881135-6fa393fb-4f62-4f39-b009-dea9bc742411.png)
30+
31+
32+
5. And we\`re done! 😃 Narrow logging messages to the loggers you are interested in
33+
34+
![image](https://user-images.githubusercontent.com/106974353/175881203-9e6e1ed2-3ba7-4ea9-a18a-a5ce314a13ab.png)
35+
36+
37+
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](HowToUseLoggers.md) to know how to do it in a better way.
38+

0 commit comments

Comments
 (0)