But I can't pass Level.DEBUG to appender.setThreshold...right? Best Regards Edmondo
Edmondo Porcu Financial software architect Avenue de Rhodanie 48 1007 Lausanne Switzerland. Dir +41 (0) 21 560 30 82 Fax +41 (0) 21 617 71 55 Email : [email protected] The information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use. -----Original Message----- From: Jacob Kjome [mailto:[email protected]] Sent: lunedì, febbraio 13, 2012 6:32 PM To: Log4J Users List Subject: Re: Programmatically create a ConsoleAppender Level is the new Priority, just as Logger is the new Category. Try Level.DEBUG. Jake On Mon, 13 Feb 2012 09:31:03 +0000 Edmondo Porcu <[email protected]> wrote: > Dear all, > I have a test-case where I want to add extra logging compared to my normal >logging settings. > > I have therefore create manually an appender, and add that to a logger. >However, > PRIORITY.DEBUG is deprecated. > > I am probably missing some information about how to add extra logging: > > private final val mockRealTimeLogger= >Logger.getLogger("MockRealTimeConnectorLogger") > mockRealTimeLogger.setLevel(Level.DEBUG) > val appender = new ConsoleAppender(new PatternLayout("%d{ABSOLUTE} [%t] >%-5p %c{1} - %m%n")); > appender.setThreshold(Priority.DEBUG) > mockRealTimeLogger.addAppender(appender) > > > Isn't this good? > > Thank you very much > > Edmondo Porcu > Associate - Financial software architect > > > > Avenue de Rhodanie 48 > 1007 Lausanne > Switzerland. > > Dir +41 (0) 21 560 30 82 >Fax +41 (0) 21 617 71 55 > Email : [email protected] > > The information in this email is confidential and may be legally privileged. >If you are not the intended recipient, you must not read, use or disseminate >the information. Although this email and any attachments are believed to be >free of any virus or other defect that might affect any computer system into >which it is received and opened, it is the responsibility of the recipient to >ensure that it is virus free and no responsibility is accepted by the Gottex >Group of Companies for any loss or damage arising in any way from its use. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] >For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
