• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ERXNSLogLog4jBridge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXNSLogLog4jBridge


  • Subject: ERXNSLogLog4jBridge
  • From: Mai Nguyen <email@hidden>
  • Date: Thu, 17 May 2012 12:07:17 -0700

Hello List,
I wonder if someone can explain the following property and its usage?
er.extensions.ERXNSLogLog4jBridge.ignoreNSLogSettings
Whichever value I used (true or false), the NSLog output is not directed to a log4J appender as it should.
My application does not use ERXApplication (not a Wonder application) so I use the traditional approach to set up log4j, something like:
 
// Log4J initialization

final URL log4jFile =
resourceManager().pathURLForResourceNamed("log4j.properties",
null, null);
System.out.println("Log4j file (from .woa): " + log4jFile);
PropertyConfigurator.configure(log4jFile);
final Logger appLog = Logger.getLogger(Application.class);
 
// Setting up logging for NSLog
final NSLog.Log4JLogger debug =
new NSLog.Log4JLogger(appLog, NSLog.DebugLevelDetailed);

final NSLog.Log4JLogger err =
new NSLog.Log4JLogger(appLog, NSLog.DebugLevelCritical);

final NSLog.Log4JLogger out =
new NSLog.Log4JLogger(appLog, NSLog.DebugLevelInformational);

NSLog.setErr(err); // DOES NOT WORK, NSLog output is not redirected to log4J
NSLog.setOut(out); // DOES NOT WORK, NSLog output is not redirected to log4J
NSLog.setDebug(debug);// DOES NOT WORK, NSLog output is not redirected to log4J

appLog.debug("Log4j has been initialized");


Thanks for your help,

-mai

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Or qualifier (including a many-to-many > 'containsObject') give wrong    results
  • Next by Date: JavaMonitor
  • Previous by thread: Re: Or qualifier (including a many-to-many > 'containsObject') give wrong    results
  • Next by thread: JavaMonitor
  • Index(es):
    • Date
    • Thread