Environment variable for Tomcat log directory?

已回答

IDEA Ultimate's Tomcat integration is great, but I was wondering if there's an environment variable to point to the (temporary) Tomcat working path, not the Tomcat installation.  I repeatedly need to get to extra log files which are stored in the temporary working directory, which on my system is something like:

 

C:\Users\me\.IntelliJIdea15\system\tomcat\Unnamed_installation_here\logs

 

Where "Unnamed_installation_here" is different for every configuration.    It would be nice to have a variable or property like ${project.logs} to point to.    Is there such a thing? 

1

Where do you want to use this environment variable?

When Tomcat is started, IDEA passes CATALINA_BASE environment variable to catalina startup script:

If you need to use it later, you can probably adjust catalina script so that it saves this variable value into some file where you can access it.

0

I'd really like to use it in this dialog.  Maybe there's something I don't understand, but the temporary CATALINA_BASE path seems to change periodically.

 

 

 

0

It should not change if you don't rename the project or run/debug configuration. This dialog doesn't support environment variables.

0

Hmm, well that takes care of that idea.   Thanks for the information.

0
Avatar
Permanently deleted user

Is there a ticket somewhere for this feature enhancement?  It's kind of a PITA to force our developers to put stuff in the same locations everywhere just so IDEA projects don't break.  Ideally we wouldn't need any absolute paths stored anywhere besides like a single variable or some such.

0

You can submit a ticket at https://youtrack.jetbrains.com/issues/IDEA and describe the use case.

0

With every new version of IntelliJ the former configured log locations are corrupt. As you see  it's part of the path

Using CATALINA_BASE:   "C:\Users\gregor.pircher\AppData\Local\JetBrains\IntelliJIdea2022.3\tomcat\aa7f9b11-fe6f-4ce9-8a94-0f60b9e58de7"

 

Not user firendly.

0

请先登录再写评论。