OpenM++ runtime library (libopenm)
openm::ILog Struct Referenceabstract

log public interface: log to console and into log files More...

Inheritance diagram for openm::ILog:
Collaboration diagram for openm::ILog:

Public Member Functions

virtual void logErr (const exception &i_ex, const char *i_msg=NULL)=0 throw ()
 log exception
 
virtual void logSql (const char *i_sql)=0 throw ()
 log sql query
 
virtual void init (bool i_logToConsole, const char *i_basePath, bool i_logToFile, bool i_useTimeStamp=false, bool i_usePidStamp=false, bool i_noMsgTime=false, bool i_isLogSql=false)=0 throw ()
 re-initialize log file name(s) and other log settings. More...
 
virtual const string getMessage (const char *i_sourceMsg)=0 throw ()
 get language-specific message by source non-translated message
 
virtual const list< string > getLanguages (void)=0 throw ()
 get list of language name for the messages, eg: (en-ca, en)
 
virtual const unordered_map< string, string > getLanguageMessages (void)=0 throw ()
 get copy of language-specific messages
 
virtual void swapLanguageMessages (const list< string > &i_langLst, unordered_map< string, string > &io_msgMap)=0 throw ()
 set language-specific messages and update list of languages
 
- Public Member Functions inherited from openm::ILogBase
virtual void logMsg (const char *i_msg, const char *i_extra=NULL)=0 throw ()
 log message
 
virtual void logFormatted (const char *i_format,...)=0 throw ()
 log message formatted with vsnprintf()
 
virtual const string timeStampSuffix (void)=0 throw ()
 return timestamp suffix of log file name: _20120817_160459_0148. More...
 
virtual const string suffix (void)=0 throw ()
 return "stamped" log file name suffix which may include timestamp and pid. More...
 

Detailed Description

log public interface: log to console and into log files

Member Function Documentation

◆ init()

virtual void openm::ILog::init ( bool  i_logToConsole,
const char *  i_basePath,
bool  i_logToFile,
bool  i_useTimeStamp = false,
bool  i_usePidStamp = false,
bool  i_noMsgTime = false,
bool  i_isLogSql = false 
)
throw (
)
pure virtual

re-initialize log file name(s) and other log settings.

Parameters
[in]i_logToConsoleif true then log to console
[in]i_basePathpath to "last" log file, if NULL or empty "" then no log file
[in]i_logToFileif true then enable log to "last" file
[in]i_useTimeStampif true then use timestamp suffix in "stamped" file name
[in]i_usePidStampif true then use PID suffix in "stamped" file name
[in]i_noMsgTimeif true then not prefix log messages with date-time
[in]i_isLogSqlif true then log SQL into log file

Implemented in openm::Log.


The documentation for this struct was generated from the following files: