YSE sound engine
1.0
cross platform sound engine
|
Public Member Functions | |
log & | sendMessage (const char *msg) |
log & | setLevel (ERROR_LEVEL value) |
ERROR_LEVEL | getLevel () |
log & | setCallback (void(*funcPtr)(const char *)) |
log & | setLogfile (const char *path) |
std::string | getLogfile () |
A singleton class for logging.
Normally this will write messages to a file when asked for. The behaviour can be overwritten though. Keep in mind that the logging system is only available between System().Init() and System().close().
log& YSE::log::sendMessage | ( | const char * | msg | ) |
You can send your own log messages to the YSE log system.
They will be printed with the keyword 'app message'. They will appear at Error loglevel.
log& YSE::log::setLevel | ( | ERROR_LEVEL | value | ) |
set the current loglevel.
By default this is set to EL_DEBUG in debug mode and EL_ERRORS in release mode. Other modes are EL_WARNINGS and EL_NONE.
log& YSE::log::setCallback | ( | void(*)(const char *) | funcPtr | ) |
You can set a custom callback function here.
This overwrites the normal logfile output
log& YSE::log::setLogfile | ( | const char * | path | ) |
set the current output file.
By default this file is called 'YSElog.txt' and will be placed in the work directory. (Dependant on OS)