certainly it is true that the code for your own TriggeringEventEvaluator is
trivial. however my personal opinion is that being able to set the triggering
level is a requirement which is common enough to be implemented in the
SMTPAppender. e.g. setting it to FATAL because you only want to know wh
> > 2 Logger.getLogger in my class files. It solves my purpose but just
> > wondering if my approach is fine?
>
>
> It's perfect :-)
>
i'd put either the String "JobStatus" or the whole logger somewhere central
like into a singleton (to make sure you can change the loggers name easily) but
th
i have a properties file and log4j 1.2.9. and javamail 1.2
and i think separating with commas like this was working:
[EMAIL PROTECTED],[EMAIL PROTECTED]
i'm no expert at this but i could imagine it also depends on the javamail
version and on the mailserver...
patrick
> -Ursprüngliche Nachr
hi wim,
i did not find any way to change the pattern, neither in the webstart nor in
the download version (with vigilog-1.3-SNAPSHOT.jar renamed to replace
vigilog-1.2.1.jar). but then i'm not sure if i realy have 1.3 working...
- how can i set the pattern?
- is there a way to see which version
this means that if you want to have a progress bar on the console you should
remove the console appender from your log4j configuration. of course this also
means that *none* of your logging is shown on the console.
but you could still log into a file.
btw: in my personal opinion writing to syste
if i understand you correctly and the memory is reclaimed once you delete the
logs, then it is no "leak" (=bad, bad, bad!) but might be "caching"
(=good,good,good!). even if this caching might be not desirable in some
situations ;-)
what i want to say is that i would check if jvn/RH is to be bl
just out of curiosity, are you saying that:
- the memory is freed when you delete the logfiles (with "rm" or something)?
- is this some redhat/java combination thing? with my short test nothing like
this can be seen under winXP
=> can you check if RH/java always is caching files (by writing a
add the following to you log4j.properties:
"
log4j.rootCategory=ALL, R1, R2
"
to log all other events to both appenders/files
or
"
log4j.logger.AbstractAnimal =ALL, R1, R2
"
to log only the events of AbstractAnimal to both appenders/files
btw:
> Note that the classes are in three difference packa
i made 3 extensions to DailyRoling file appender:
1) dated => the current logfile will also include the date and will not be
renamed on rolling
2) compressing => old logs are compressed.
3) "cleaning" => stupid name but it will delete all files ending with zip which
are older than the given max d
i'm not sure if i understand what you want to do but i see 2 possibilities:
- have only one log4jconfig and in that define a separat console appender and
let the castor packages log to this (additivity=fasle)
- do the same configuration from within your code
cheers
patrick
> -Ursprüngliche
> As soon as I uncomment "" in the
> example given
> below, log4j is no longer picked up (by commons-logging). Is
> there anything
if it's working otherwise then make sure that you have all needed libraries in
your classpath (mail.jar, activation.jar)
> wrong with the configuration? There is
i guess the easiest solution is to subclass RollingFileAppender (or
DailyRollingFileAppender) and override rollOver() to write something into the
new file after calling super.rollOver()
be aware that if you want to do this with DailyRollingFileAppender you have to
put your class into the packag
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
> > 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
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
> 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
jacob,
thanks for your advice. as you seem to be expert on servlets maybe you can tell
me what you think of the way i used to handle my logs when i was doing servlets
under jboss (it's been more than a year ago, so this all may be a little
inaccurate):
1. i have 2 system properties: log-path a
20 matches
Mail list logo