Next: , Previous: MIN Logger API, Up: MIN Logger API


8.1.1 MinLogger API

he methods of MIN Logger are listed and explained below: The main methods of MinLogger are:

MinLogger *mnl_create (const TSChar * path, const TSChar * file, unsigned int loggertype, unsigned int output, TSBool overwrite, TSBool withtimestamp, TSBool withlinebreak, TSBool witheventranking, TSBool pididtologfile, TSBool createlogdir, unsigned int staticbuffersize, TSBool unicode)
Creates MIN Logger "object".
const TSChar* path
Output directory
const TSChar* file
Output filename
unsigned int loggertype
Type of the logger that is in use
unsigned int output
Output plugin type number
TSBool overwrite
Overwrite file if exists flag
TSBool withtimestamp
Add timestamp flag
TSBool withlinebreak
Add line break flag
TSBool witheventranking
Do event ranking flag
TSBool pididtologfile
Process ID to log file flag
TSBool createlogdir
Create output directory if not exists flag
unsigned int staticbuffersize
Size of static buffer
TSBool unicode
Unicode flag
Return value
Pointer to created MIN Logger data structure
void mnl_destroy (MinLogger** mnl)
Destroys MIN Logger instance
MinLogger** mnl
The pointer reference to MinLogger data structure
Return value
none
int mnl_log (MinLogger * mnl, TSStyle style, const TSChar * format, ...);
Writes information to log
MinLogger * mnl
Pointer to the MinLogger instance to be used
TSStyle style
The style to be used
const TSChar * format
Format of the message to be logged
...
Extra parameters, according to the message format
Return value
Return error code 0 if logging operation completed successfully, else error code -1 if operation failed
mnl_write_delimiter (MinLogger * mnl)
Writes delimiter to log
MinLogger * mnl
Pointer to MIN Logger instance
Return value
none
void mnl_write_own_delimiter (MinLogger * mnl, const TSChar c, unsigned int t);
Writes user defined delimiter to log
MinLogger * mnl
Pointer to MIN Logger instance
const TSChar c
Character used as a delimiter
unsigned int t
Number of character in the delimiter string
Return value
none
unsigned int mnl_output_type (MinLogger * mnl)
Returns the information which output plug-in is used with logger
MinLogger * mnl
Pointer to MIN Logger instance
Return value
"OR" modified mask of output plug-in types that were created for this logger
unsigned int mnl_logger_type (MinLogger * mnl)
Returns the information which logs are created
MinLogger * mnl
Pointer to MIN Logger instance
Return value
"OR" modified mask of log typed plug-in types that were created