ok, maybe like this
http://www.nabble.com/file/5911/log4jCompressingAppender-src.zip
log4jCompressingAppender-src.zip
--
View this message in context:
http://www.nabble.com/Automatically-zipping-and-archiving-logs--tf3083277.html#a8569737
Sent from the Log4j - Users mailing list archive
Try adding something like the following to your log4j.xml, after the existing
entry...
You can always create a separate appender for loggers other than
"com.company.sql" instead of using the "DBUNIT.DEBUG.LOG" appender for the
logger.
I think the log4j.xml file is being found. You ju
and here are the files, sorry...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
DatedRollingFileAppender => also the actual file has the date in it this seems
to cause less problems under windows
CompressingRollingFileAppender => zips the file after rolling
CleaningCompressingRollingFileAppender => deletes all files (*ALL FILLES, not
only log files!!!*) in the log director
Any way you could send this to the list? I would be interested in seeing your
solution.
Thanks
Wyss Patrick <[EMAIL PROTECTED]> wrote:
> i have done that, (you can also specify a max age for the files...) however
> it is not documented well. i'll send it to you directly, comments welcome ;
> > No, I don't think so. "some string here" is a constant. It gets
> > interned. No new object gets created on each call. The String gets
> > created once when the class loads.
>
> how much would you bet :-]
>
ooops i guess i was wrong here :-}
apologies for opening my big mouth ;-)
--
i have done that, (you can also specify a max age for the files...) however it
is not documented well. i'll send it to you directly, comments welcome ;-)
cheers
patrick
> -Ursprüngliche Nachricht-
> Von: news [mailto:[EMAIL PROTECTED] Auftrag von Chris
> Gesendet: Mittwoch, 24. Januar 2
> Internally, I'm sure the info() method is calling Object.toString(),
> which does create a new String object.
you are right Layout.format will turn it into a String. smart appenders do this
using StringBuffer/Builder.
format could format to a StringBuffer/Builder but this does not realy matte
Does anyone know of a way to zip log files automatically and copy them
to an archive? I'm thinking that an Appender that did this would be cool.
We've got an installation with a number of app servers that generate
huge logs at very high speed. If we could zip a log whenever it rolled
over, and
Wyss Patrick wrote:
Why does the logger force you to use Strings?
no body is forced to log *strings* have a look at the signature of
Logger.info():
public void info(Object message)
Internally, I'm sure the info() method is calling Object.toString(),
which does create a new String object.
i tought your first idea of having loggers which can be configured to filter
the events was quite appealing. however i can't say if this would be a bad
design idea for some architectural/performance reason(s). [actually i suspect
that there is a reason why this is not done yet, mainly because yo
Thank you very much for your response Ron.
Funny that you should mention the multi-appender idea. I've already gone
down that road. I rolled my own appender class that mimics appender-ref
functionality of Ansynchronous appender, but leaves out the rest. I've
tested the appender, and it works j
Brett --
I can't address the reasons for why filters aren't allowed at the logger
level, but I can offer you a solution to your problem.
Appenders can be nested. Simply attach an appender "A" to the logger
for "com.xyz.dostuff". The configure appender "A" with the filter
you've described and th
Lisa --
You don't need to make any modifications to the mvn script to accomplish
what you're trying to do. Here's what we do...
1) Set up a directory that will contain resource/configuration files
that you want available when you run your tests. For us, we use
${basedir}/src/test/config
2) Put
> Why does the logger force you to use Strings?
no body is forced to log *strings* have a look at the signature of
Logger.info():
public void info(Object message)
so use StringBuffers (or if using java1.5 StringBuilder) if you like to.
however IMHO your code is generating unnecessary String o
15 matches
Mail list logo