1

I am trying to know if it’s possible to have a per-month access log directory in Tomcat 7. After having read the access log Valve documentation it doesn’t seem like it.

Ideally, it would be something similar to this:

<Valve ...
    directory="logs/%d{YYYY-MM}/${tomcat.hostname}"
    ...
/>

Are there any variables that can be set to achieve this?

Alf
  • 1,414
  • 1
  • 15
  • 27

1 Answers1

2

I don't know of a way to do that with Tomcat. But if you use logrotate to rotate the logs, instead of letting Tomcat do it, then you have many more options.

Mike Baranczak
  • 8,291
  • 8
  • 47
  • 71
  • Not exactly an answer, but a possible workaround. I’m accepting it as there seems to be no way to configure `server.xml` in Tomcat to do what I want. Thanks. – Alf Dec 01 '15 at 01:25