5:52, EET
October 21, 2014
Where is the PropertyConfigurator’s “log.properties” file being used? I dont see it being used anywhere in the sampleConsoleClient application! Is it used in the libraries (jars)
When I comment it out I get the following warnings:
log4j:WARN No appenders could be found for logger (com.prosysopc.ua.UaApplication).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4…..l#noconfig for more info.
What is the implication of excluding it from declarations? Will it overwrite the log file on every restart of the application?
The reason I want to comment it in my application is that its not going forward beyond the code
PropertyConfigurator.configureAndWatch(SampleConsoleClient.class.getResource(“log.properties”).getFile(), 5000);
But when I comment it , it goes ahead.
Any comments will be appreciated.
PRAMANJ.
7:38, EET
April 17, 2013
Hi,
The SDK uses slf4j logging facade. The slf4j enables application developers to choose the logging library flexibly. The sample applications in turn use log4j logging library. This means that to use the sample applications, your classpath needs to contain slf4j library, slf4j bridge and log4j logging library. For example: slf4j-api-1.7.7.jar, slf4j-log4j12-1.7.7.jar, log4j-1.2.17.jar.
The log.properties file in the sample applications is used to configure the log4j logging system. See examples of log.properties file in folders samples\com\prosysopc\ua\samples\client and samples\com\prosysopc\ua\samples\server
10:30, EET
October 21, 2014
Ok. But should the “log.properties” file preexist in the source folder? When I use the libraries in my application, the “log.properties” file doesn’t exist in my src folder and my application hangs at the “PropertyConfigurator.configureAndWatch(SampleConsoleClient.class.getResource(“log.properties”).getFile(), 5000);” call! When I comment it out it progresses but gives warning at run time as mentioned above.
Is it OK to proceed with commenting out this line, if I don’t intend to log any info in the file?
regards
PRAMANJ
Most Users Ever Online: 1919
Currently Online:
16 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 738
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1