From ee77cee46490b503e9c9b48c2b8e0710b30c22d9 Mon Sep 17 00:00:00 2001 From: JaneEugenia <106974353+JaneEugenia@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:57:48 +0300 Subject: [PATCH 1/5] Create Logging.md --- Logging.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Logging.md diff --git a/Logging.md b/Logging.md new file mode 100644 index 0000000000..4dc5d31368 --- /dev/null +++ b/Logging.md @@ -0,0 +1,36 @@ +# How to enable IntelliJ Gradle Plugin logging + +We have loggers in UtBot IntelliJ Plugin like the following one: + + +`val logger = Logger.getInstance(CodeGenerator::class.java)` + + +Instead of recording them in files only, we can put them right into IntelliJ IDEA. So, let\`s do it then! 😃 + + +1. In UTBot repository find Gradle > Tasks > intellij > runIde and choose it with the right button click + +![image](https://user-images.githubusercontent.com/106974353/175880783-57a190f1-283d-448f-984b-8acd62af657c.png) + + +2. Select Modify Run Configuration... item, and then Modify options > Specify logs to be shown in console + +![image](https://user-images.githubusercontent.com/106974353/175881032-944bc31a-bd13-43c1-9ebf-e2b542984b7d.png) + + +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 + +![image](https://user-images.githubusercontent.com/106974353/175881081-4612493b-a8fb-4c5b-b3b2-edaa4bea0703.png) + + +4. Restart the 'runIde' task, check that the new tab is present in your IDE + +![image](https://user-images.githubusercontent.com/106974353/175881135-6fa393fb-4f62-4f39-b009-dea9bc742411.png) + + +5. And we\`re done! 😃 Narrow logging messages to the loggers you are interested in + +![image](https://user-images.githubusercontent.com/106974353/175881203-9e6e1ed2-3ba7-4ea9-a18a-a5ce314a13ab.png) + + From 757e3e44b7693e6759c8f64323fc2a7d03417e30 Mon Sep 17 00:00:00 2001 From: JaneEugenia <106974353+JaneEugenia@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:27:53 +0300 Subject: [PATCH 2/5] Update Logging.md --- Logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logging.md b/Logging.md index 4dc5d31368..f16eac6c59 100644 --- a/Logging.md +++ b/Logging.md @@ -6,7 +6,7 @@ We have loggers in UtBot IntelliJ Plugin like the following one: `val logger = Logger.getInstance(CodeGenerator::class.java)` -Instead of recording them in files only, we can put them right into IntelliJ IDEA. So, let\`s do it then! 😃 +Instead of placing loggers output in the standard stream or a file, we can put them right into IntelliJ IDEA. So, let\`s do it then! 😃 1. In UTBot repository find Gradle > Tasks > intellij > runIde and choose it with the right button click From ec9b9e7093f679bb3f58bccc34fbc553cebe9d67 Mon Sep 17 00:00:00 2001 From: JaneEugenia <106974353+JaneEugenia@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:43:01 +0300 Subject: [PATCH 3/5] Update Logging.md --- Logging.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Logging.md b/Logging.md index f16eac6c59..085a4faa73 100644 --- a/Logging.md +++ b/Logging.md @@ -1,12 +1,12 @@ -# How to enable IntelliJ Gradle Plugin logging +# How to enable UTBot logging in IntelliJ IDEA -We have loggers in UtBot IntelliJ Plugin like the following one: +In UTBot we use loggers like the following one: `val logger = Logger.getInstance(CodeGenerator::class.java)` -Instead of placing loggers output in the standard stream or a file, we can put them right into IntelliJ IDEA. So, let\`s do it then! 😃 +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! 😃 1. In UTBot repository find Gradle > Tasks > intellij > runIde and choose it with the right button click From e14ebbbbf57c824ca3d954e9d9dfd546c83cb4d8 Mon Sep 17 00:00:00 2001 From: JaneEugenia <106974353+JaneEugenia@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:59:51 +0300 Subject: [PATCH 4/5] Rename Logging.md to EnableLogging.md --- Logging.md => EnableLogging.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Logging.md => EnableLogging.md (100%) diff --git a/Logging.md b/EnableLogging.md similarity index 100% rename from Logging.md rename to EnableLogging.md From 06efbdd57c80deb5e796b133faf419ee1019d552 Mon Sep 17 00:00:00 2001 From: JaneEugenia <106974353+JaneEugenia@users.noreply.github.com> Date: Tue, 28 Jun 2022 15:39:20 +0300 Subject: [PATCH 5/5] Update EnableLogging.md --- EnableLogging.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EnableLogging.md b/EnableLogging.md index 085a4faa73..2247b67eb2 100644 --- a/EnableLogging.md +++ b/EnableLogging.md @@ -34,3 +34,5 @@ Instead of sending loggers output in the standard stream or a file, we can put t ![image](https://user-images.githubusercontent.com/106974353/175881203-9e6e1ed2-3ba7-4ea9-a18a-a5ce314a13ab.png) +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. +