Where is the "server log" for Tomcat when running externally from IntelliJ Ultimate?
Asked Answered
P

3

20

When running my Vaadin app on Tomcat 8.5 externally from IntelliJ Ultimate 2017.2 on macOS Sierra, I get an error message:

Artifact timepiece-ui:war exploded: Error during artifact deployment. See server log for details.

➠ Where is this ‘server log’?

When I look in apache-tomcat-8.5.20 > logs, the folder is empty. Indeed, I cannot find any trace of my app being deployed within apache-tomcat-8.5.20.

➠ Is there some other place where IntelliJ+Tomcat is placing my app and the server logs?

screen shot of "Run/Debug Configurations" > "Logs" dialog box

screen shot of "Application Servers" dialog with Apache Tomcat configuration displayed

Parament answered 14/8, 2017 at 2:46 Comment(2)
There are "Tomcat localhost log" and "Tomcat catalina Log" tabs inside "Debug" bottom frameKrantz
Similar: Where do messages sent to System.err go when using Tomcat externally to run a web app from IntelliJ?.Parament
E
20

IntelliJ IDEA shows the log files you configure in the Run/Debug configuration settings as the separate tabs in the Run or Debug tool window.

screenshot of Run/Debug Configurations dialog, Logs tab

For Tomcat the actual logs are placed under CATALINA_BASE/logs directory. The value of the CATALINA_BASE set by IntelliJ IDEA will be printed in the console of the Run or Debug tool window.

You can also find the log files under idea.system.path/tomcat/<configuration name>/logs/.

Exhalant answered 14/8, 2017 at 3:1 Comment(3)
Ahhh, I see now. I assumed CATALINA_BASE would be within the Tomcat folder. But, no, it was: /Users/basilbourque/Library/Caches/IntelliJIdea2017.2/tomcat/Unnamed_timepiece_3. I've no idea why the Unnamed_ was prefixed, but otherwise makes sense. That folder does have a nested logs folder populated with log files. Thanks! And as Jerry06 commented, IntelliJ does indeed display the logs as tabs in the server output panel, but I had not noticed. By the way, I do not see any hash involved in the folder name, but otherwise this Answer is spot-on correct.Parament
Update: Now in IntelliJ 2022.2 Beta I find the logs in /Users/my_user_name/Library/Caches/JetBrains/IntelliJIdea2022.2/tomcat/some_UUID_hex_string/logsParament
For Tomcat the actual logs are placed under CATALINA_BASE/logs directory - this is exactly what i needed to know. Thanks so much.Bloodstock
P
22

IntelliJ displays Tomcat logs

The accepted Answer by CrazyCoder is correct.

In addition, as commented by Jerry06, IntelliJ Ultimate does automatically display the logs as tabs in the server output pane.

The files backing those logs are stored in the CATALINA_BASE as explained in the other Answer.

screen shot of server output panel showing (a) tabs for logs, (b) 'CATALINA_BASE' path logged

Parament answered 14/8, 2017 at 4:21 Comment(1)
How could I not see that? Thanks a lot!Valentijn
E
20

IntelliJ IDEA shows the log files you configure in the Run/Debug configuration settings as the separate tabs in the Run or Debug tool window.

screenshot of Run/Debug Configurations dialog, Logs tab

For Tomcat the actual logs are placed under CATALINA_BASE/logs directory. The value of the CATALINA_BASE set by IntelliJ IDEA will be printed in the console of the Run or Debug tool window.

You can also find the log files under idea.system.path/tomcat/<configuration name>/logs/.

Exhalant answered 14/8, 2017 at 3:1 Comment(3)
Ahhh, I see now. I assumed CATALINA_BASE would be within the Tomcat folder. But, no, it was: /Users/basilbourque/Library/Caches/IntelliJIdea2017.2/tomcat/Unnamed_timepiece_3. I've no idea why the Unnamed_ was prefixed, but otherwise makes sense. That folder does have a nested logs folder populated with log files. Thanks! And as Jerry06 commented, IntelliJ does indeed display the logs as tabs in the server output panel, but I had not noticed. By the way, I do not see any hash involved in the folder name, but otherwise this Answer is spot-on correct.Parament
Update: Now in IntelliJ 2022.2 Beta I find the logs in /Users/my_user_name/Library/Caches/JetBrains/IntelliJIdea2022.2/tomcat/some_UUID_hex_string/logsParament
For Tomcat the actual logs are placed under CATALINA_BASE/logs directory - this is exactly what i needed to know. Thanks so much.Bloodstock
C
0

For Linux, I'm not sure if its the same for IntelliJ Ultimate, but in the community edition, you can find the Catalina server logs in /home/.SmartTomcat///${catalina.base}/logs. If you couldn't find the .SmartTomcat folder, enable Show hidden files in your file explorer. Since community edition of IntelliJ doesn't support Tomcat, we need to use the Smart tomcat plugin and so the server logs are available in the SmartTomcat directory.

Conspicuous answered 11/12, 2021 at 6:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.