2010/9/21 Christopher Gross <cogr...@gmail.com>:
> I have an older version of Solr (1.2) running on Tomcat 5.5.25.
>

How do they perform their logging? Do they use some logging library?
If yes, then you should configure that library.

> I added swallowOutput="true" to the solr context file.

swallowOutput works for simple things like System.out.println(), but
it fails in certain more complex cases


E.g., java.util.logging.ConsoleHandler  (see your logging.properties)
is created at some early time when the server starts.  It remembers a
reference to the original System.out (err) stream and thus is not
affected by swallowOutput.


Note the following line in logging.properties:
.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

It means that if some event is not logged by other handlers, by
default it will be logged both by 1st FileHandler and by
ConsoleHandler.  If you remove ConsoleHandler from that line  those
events won't be printed to the console (and thus to the catalina.out)

Best regards,
Konstantin Kolinko


> All the output for Solr is going to the catalina.out logfile, which
> gets rather large and has to be deleted about once a month, requiring
> me to stop Tomcat and bring it back up each time.  I'd like to make a
> new logfile for Solr that rolls over daily, so that it is easy to
> clean up the records with a cron job.
>
>
> I have altered the logging.properties file for Tomcat:
> handlers = 1catalina.org.apache.juli.FileHandler, ..... ,
> 6solr.org.apache.juli.FileHandler
>
> 6solr.org.apache.juli.FileHandler.level = FINE
> 6solr.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 6solr.org.apache.juli.FileHandler.prefix = solr.
>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/solr].level
> = ALL
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/solr].handlers
> = 6solr.org.apache.juli.FileHandler
>
> When I restart Tomcat, some entries appear in the new Solr log (saying
> the listener & filter have been started), but the normal output from
> Solr still goes to the catalina.out.
>
> From what I've read on the Tomcat documentation, the above entries
> should do the trick.  Does anyone have an idea of something else I can
> try to solve this problem?  Updating any of the software is not an
> option.  I do have a similar question to this one on the Solr mailing
> list, but they were saying to use Tomcat to control the logging.
>
> Any help would be greatly appreciated!  Thanks!
>
> -- Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to