[slf4j-user] Sending output to a file?
Robin Szemeti
robin at redpoint.org.uk
Tue Feb 7 03:42:14 CET 2012
Hi,
I have a java project with slf4j with log4j as root logger
Ive struggles to see how to add a FileAppender throughthe slf4j API,
basically, after the program starts up and the user chooses which tcp
port it is going to attach to (command line interactive) I need to
route the logs to [portnumber]-[datestamp].log
What I *dont* want to do is mess around with the Appenders in the log4j
xml config file ... but I'm confused as to how to chnage the appender
via the facade ..
I have somehting similar to :
private static final Logger logger =
LoggerFactory.getLogger(ServerTest.class);
at the top of each class ...
clues?
--
Best regards,
Robin Szemeti
Redpoint Consulting Limited
E: robin at redpoint.org.uk
T: +44 (0) 1299 405028
M: +44 (0) 7971 883371
CONFIDENTIALITY NOTICE
The information contained in this e-mail is intended only for the
confidential use of the above named recipient. If you are not the
intended recipient or person responsible for delivering it to the
intended recipient, you have received this communication in error
and must not distribute or copy it.
Please accept the sender's apologies, notify the sender immediately
by return e-mail and delete this communication.
Thank you.
More information about the slf4j-user
mailing list