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

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
  • 1
    There are "Tomcat localhost log" and "Tomcat catalina Log" tabs inside "Debug" bottom frame – Viet Aug 14 '17 at 02:53
  • Similar: [*Where do messages sent to System.err go when using Tomcat externally to run a web app from IntelliJ?*](https://stackoverflow.com/q/59132401/642706). – Basil Bourque Dec 02 '19 at 04:11

3 Answers3

20

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

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
19

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/.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    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. – Basil Bourque Aug 14 '17 at 03:20
  • 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/logs` – Basil Bourque Jul 15 '22 at 20:29
  • For Tomcat the actual logs are placed under CATALINA_BASE/logs directory - this is exactly what i needed to know. Thanks so much. – Tameem Khan Nov 22 '22 at 04:48
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.