How to configure tomcat to rollover catalina.log log files
463
You are using the FileHandler, documented here: http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/juli/FileHandler.html It does not have a "limit" property, it only rotates at day changes.
You can configure tomcat to use log4j which is more flexible, see this page: http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j
swallowOutput in context is not recommended for use (that's what the above page says)
Related videos on Youtube
Author by
Eran Abir
Updated on September 18, 2022Comments
-
Eran Abir over 1 year
i managed to authenticate a user through Active Directory with this code
DirectoryEntry entry = new DirectoryEntry(ADPath, domainAndUsername, password); object obj = entry.NativeObject; DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=" + username + ")"; search.PropertiesToLoad.Add("cn"); SearchResult result = search.FindOne(); if (null == result) { return "false"; }
after if user is authenticated i want to create authorization rule for this user to block access to ApiControllers that i have
how can i do that ?
Thanks for helping!
-
AndreasM over 12 yearsNever used tomcat on windows, but I think this is just stdout/stderr and they aren't redirected in the logging.properties. You can check that if you change the file location in logging.properties. See
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
In my view you need a windows solution for logrotation likehttp://www.sprint.net.au/~terbut/usefulbox/apachelogrot.htm
or fiddle with the tomcat service to redirect it to eventlog. -
Srinivas over 12 yearsI'm actually redirecting the stdout/stderr messages to catalina.log with giveing swallowoutput=true in context element of server.xml.
-