Re: [logback-user] Multiple files and other issues

--------- Original Message -------- Da: logback users list <logback-user@qos.ch> To: logback users list <logback-user@qos.ch> Oggetto: Re: [logback-user] Multiple files and other issues Data: 06/03/09 10:59
What do you mean by customization of the file according to application session? Do you mean that the log file *name* should depend on some data found in the session or do you mean that the data contained *within* the log file should depend on data from the session? By the way, what is the data in the session? Is it the user name?
Sorry, I was not clear. What happens now, with the basic file, is: 1. I run my application; 2. the file trace/WebEML is created; 3. the application is running; 4. I run another session of my application (i.e.: double click again); 5. the same trace/WebEML file seems used. I'd like to have, for example, something like: trace/WebEML_111145.log for the first application session, ran at 11:11.45 and trace/WebEML_111222.log for the secon application session, ran at 11:12.22 or something like that, in order to distinguish the two different logs. Is it possible? Thanks, Marco -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: Blu American Express: gratuita a vita! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8697&d=20090306

The type of separation is possible. However, it is a relatively advanced feature. I suggest that you start by using MDC and go from there. MDC will allow you to distinguish log entries from issued from different sessions. However, all the logs will still go to the same file. Documentation on MDC can be found at http://logback.qos.ch/manual/mdc.html Cheers, Marco Bresciani wrote:
Sorry, I was not clear. What happens now, with the basic file, is:
1. I run my application; 2. the file trace/WebEML is created; 3. the application is running; 4. I run another session of my application (i.e.: double click again); 5. the same trace/WebEML file seems used.
I'd like to have, for example, something like:
trace/WebEML_111145.log for the first application session, ran at 11:11.45 and
trace/WebEML_111222.log for the secon application session, ran at 11:12.22
or something like that, in order to distinguish the two different logs. Is it possible?
Thanks,
Marco -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f
Sponsor: Blu American Express: gratuita a vita!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8697&d=20090306
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch
participants (2)
-
Ceki Gulcu
-
Marco Bresciani