On Mon, Jun 21, 2010 at 04:34:07PM -0500, Thornton, Susan M. 
(LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY] wrote:
> We have Google crawling our DSpace site daily and it really fills up
> our DSpace .log files.  We  would like to implement a second
> dspace.log file (google.log?) in DSpace 1.5.1 and would like to know
> if this is an easy thing to accomplish.  Has anyone done this?

I haven't tried that.  I rummaged around in
<a href='http://logging.apache.org/log4j/1.2/index.html'>the
documentation for log4j</a> and found hints about a component called a
"filter", and there are some filters which look promising.  I think
what you'd do is set up two appenders subject to opposite senses of
the same filter for a characteristic pattern, so that one would export
all of the Google records and the other all of the not-Google
records.  log4j.rootCategory would then be set to use both appenders.

The end-user documentation for log4j is thin.  You'll very likely
need to read the javadoc.  (Maybe not -- there's a book on log4j but I
haven't seen it.)  The configuration language is discussed in
org.apache.log4j.PropertyConfigurator.

> Also we'd like to know where to tell DSpace to allow more than the
> current 500 versions of our rolling DSpace .log files?

Logging is configured in '[DSpace]/config/log4j.properties'.  You can
set log4j.appender.A1.MaxBackupIndex to as many as you want to keep.
Beware! the value 0 means "keep no backups" -- it seems there is no
way to express "keep them all forever".

You might wish to consider a different appender.
DailyRollingFileAppender cuts off the log at various intervals and
renames it according to a date pattern that you specify.  (OTOH its
documentation recommends using something similar out of the
<a href='http://logging.apache.org/log4j/companions/extras/index.html'>
log4j "extras" collection</a> due to synchronization problems.)

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Balance your desire for bells and whistles with the reality that only a 
little more than 2 percent of world population has broadband.
        -- Ledford and Tyler, _Google Analytics 2.0_

Attachment: pgpB67a4cehqw.pgp
Description: PGP signature

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
  • [Dspac... Thornton, Susan M. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
    • R... Mark H. Wood

Reply via email to