-
Notifications
You must be signed in to change notification settings - Fork 0
Log module
Francesco Saverio Castellano edited this page Mar 18, 2020
·
25 revisions
The Log
module is based on the log4cxx library and therefore loggers can be configured in the same way and support the same functionality brought by log4cxx.
OS.init(string configPath)
Initializes the log module using the provided configuration file. This file must be a valid log4cxx\log4j configuration XML.
A default configuration can be found in the conf\
directory of TINN.
The OS.init
function must be called one time only in the main thread and then once initialized the library can be used accross all threads (log4cxx is thread safe).
When initialization fails (configuration file not found or wrong syntax) an exception is thrown.
The following code shows how to initialize the log module using the default configuration file:
Log.init("conf/Log4cxxConfig.xml");