|
From: Ere M. <ere...@he...> - 2014-10-13 12:36:58
|
I'd suggest configuring Solr to rotate the logs, so you won't need
logrotate at all. Solr can use SLF4J (up to version 4.2.1) or a
selectable logging facility (from 4.3), and you can configure it to
rotate logs. Without any configuration it seems logging will go to
standard output, which means that in VuFind everything ends up in
wherever JETTY_CONSOLE points to, but setting up SLF4J lets Solr logging
output to go somewhere else.
I don't usually run VuFind's default Solr, but it seems to have a sample
logging.properties file in solr/jetty/etc. You could modify (a copy of)
it and add a line like this:
java.util.logging.FileHandler.count = 10
This means rotation keeps 10 files. Note that the default log directory
in logging.properties is ./logs, so create it or change
java.util.logging.FileHandler.pattern as necessary. Then specify the
logging configuration when starting Solr like this (or modify your
startup script accordingly):
JAVA_OPTIONS="-Djava.util.logging.config.file=solr/jetty/etc/logging.properties"
./vufind.sh start
Hope this helps, but if I was unclear, feel free to ask for clarification!
--Ere
13.10.2014 14.09, Katharina Wolkwitz kirjoitti:
> Hello everybody!
>
> After setting up solr to write it's logfiles to /var/log/solr/solr.log I then
> set up logrotate in order to minimize the needed server space.
>
> Now I've encountered problems when I wanted to analyze the older logfiles and
> found that all the files seemed to end when the logrotate-process starts and a
> new file only begins when the server or vufind is next rebootet. :-(
>
> Here is the /etc/logrotate.d/solr-file:
>
> /var/log/solr/solr.log {
> compress
> dateext
> maxage 365
> rotate 99
> size=+4096k
> daily
> notifempty
> missingok
> create 644 svnuser svn
> }
>
> I guess the problem is that solr needs to be told explicitly to start a new
> logfile, but how do I do that? I googled but didn't really find a satisfying
> answer to that problem...
>
> Any tipps appreciated.
> Kate
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Vufind-tech mailing list
> Vuf...@li...
> https://lists.sourceforge.net/lists/listinfo/vufind-tech
>
--
Ere Maijala
Kansalliskirjasto / The National Library of Finland
|