|
CRM32Pro SDK
v5.22
|
ILogSystem. More...
ILogSystem.
Interface to log your application
Public Member Functions | |
| unsigned char | GetState (void) |
| Get log system state. More... | |
| void | Halt () |
| Halt the log output. | |
| void | Init (char *filename, char mode, char level, char *prgname, char *author=NULL, char *email=NULL, char *web=NULL) |
| Init LogSystem. More... | |
| void | Msg (char level, char *,...) |
| Output a log message. More... | |
| void | ProfileBegin (char *name) |
| Mark the begin of profile block. More... | |
| void | ProfileEnd (char *name) |
| Mark the end of profile block. More... | |
| void | ProfileShow (void) |
| Print to log system the samples results table. | |
| void | Resume () |
| Resume a previous halted log system. | |
| void | ShowTime (char) |
| Print automatically the time when occurred the event each time you call to Msg(). More... | |
| unsigned char CRM32Pro_ILogSystem::GetState | ( | void | ) |
Get log system state.
| void CRM32Pro_ILogSystem::Init | ( | char * | filename, |
| char | mode, | ||
| char | level, | ||
| char * | prgname, | ||
| char * | author = NULL, |
||
| char * | email = NULL, |
||
| char * | web = NULL |
||
| ) |
Init LogSystem.
| filename | name of log file |
| mode | LOG_NULL,LOG_CONSOLE,LOG_FILE,LOG_FILEAPPEND,LOG_DRTS. You can use logic OR to combine them. |
| level | LOG_LOW,LOG_NORMAL,LOG_HIGH |
| prgname | name of your program |
| author | author name (none by default) |
| email of author (none by default) | |
| web | web page of your project (none by default) |
| void CRM32Pro_ILogSystem::Msg | ( | char | level, |
| char * | format, | ||
| ... | |||
| ) |
Output a log message.
| level | set level requiered to log the message |
| format | format parameter as printf function |
| void CRM32Pro_ILogSystem::ProfileBegin | ( | char * | name | ) |
Mark the begin of profile block.
You must use the same name to mark the begin-end of desired block
These blocks can be nested.
| name | name of your block. |
| void CRM32Pro_ILogSystem::ProfileEnd | ( | char * | name | ) |
Mark the end of profile block.
You must use the same name to mark the begin-end of desired block
These blocks can be nested.
| name | name of your block. |
| void CRM32Pro_ILogSystem::ShowTime | ( | char | m | ) |
Print automatically the time when occurred the event each time you call to Msg().
By default it is disabled.
It only works with LOG_FILE or LOG_FILEAPPEND. It does not display any information to console system.
| m | 0 to disable it or any other value to enable it. |
1.8.3.1