Solr uses whatever is pushing it to the web for logging, so that will
be Tomcat in my case.  Log4j can be configured for it, but I do not
have that set up now.  If this proves to be difficult I may give that
a try, in order to get the output from Solr out of the catalina.out
file.

OK, so with the swallowOutput set, if Solr had an error (one hasn't
happened today that I can tell) it should go to the solr.log file that
my settings created?

So should I add my solr logger to the .handlers?  Or will that start
pushing all log entries to the solr.log file?  I cannot remove the
logging completely -- I just need it to go to a different file that
can be rolled.

Thanks for your help!

-- Chris



On Tue, Sep 21, 2010 at 1:03 PM, Konstantin Kolinko
<knst.koli...@gmail.com> wrote:
> 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
>
>

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

Reply via email to