[logback-user] about file appender
berkerbatur at gmail.com
Wed Sep 28 11:00:04 CEST 2011
I want to add a file appender to one of my loggers, from the inside of
the code, not from the configuration file.
I successfully append the network appender but the same way did not
work in file appenders.
Here is the code that I tried:
FileAppender<E> myFAppender = new FileAppender<E>();
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
myLogger.addAppender(myFAppender); <---- this method do not accept
an argument type of FileAppender<E> .
In socket appender, I used ILogging event and it worked well but in
file appender case I did not solve the issue below.
More information about the Logback-user