Xors3d Engine
Logging

Functions

BBDECL void BBCALL xClearLogString ()
 Clears log string.
BBDECL int BBCALL xCloseLog ()
 Finishes logging.
BBDECL int BBCALL xCreateLog (int target=1, int level=0, const char *filename="xors_log.html", const char *cssfilename="")
 Starts logging.
BBDECL int BBCALL xGetLogLevel ()
 Returns current logging level.
BBDECL const char *BBCALL xGetLogString ()
 Returns string which contains log messages.
BBDECL int BBCALL xGetLogTarget ()
 Returns current logging target.
BBDECL void BBCALL xLogError (const char *message, const char *func="", const char *file="", int line=-1)
 Adds an Error-styled entry to log system.
BBDECL void BBCALL xLogFatal (const char *message, const char *func="", const char *file="", int line=-1)
 Adds a Fatal-styled entry to log system.
BBDECL void BBCALL xLogInfo (const char *message, const char *func="", const char *file="", int line=-1)
 Adds a Info-styled entry to log system.
BBDECL void BBCALL xLogMessage (const char *message, const char *func="", const char *file="", int line=-1)
 Adds a Message-styled entry to log system.
BBDECL void BBCALL xLogWarning (const char *message, const char *func="", const char *file="", int line=-1)
 Adds a Warning-styled entry to log system.
BBDECL void BBCALL xSetLogLevel (int level=2)
 Changes logging level.
BBDECL void BBCALL xSetLogTarget (int target=1)
 Changes logging target.

Function Documentation

BBDECL int BBCALL xCreateLog ( int  target = 1,
int  level = 0,
const char *  filename = "xors_log.html",
const char *  cssfilename = "" 
)

Starts logging.

This function enables engine logging. You can specify logging level, target, html-file and css-file for log output.

Parameters:
targetLogging target. See 'Logging output targets' for more information
levelLogging level. See 'Logging level' for more information
filenameLog file for output (needed if HTML logging is enabled). Existing file will be overwritten!
cssfilenameA path to an external style sheet used by HTML log. A full or relative path is acceptable.
Returns:
Non-zero value indicates an error. -1 if logging is already started. Positive value is equal to errno code.
BBDECL int BBCALL xCloseLog ( )

Finishes logging.

This function finishes logging and closes log file (if HTML output was enabled).

Returns:
Non-zero value indicates an error. -1 if logging is already finished or hasn't been started.
BBDECL const char* BBCALL xGetLogString ( )

Returns string which contains log messages.

This function returns log meessages written since last xClearLogString() or xGetLogString() call.

See also:
xClearLogString()
BBDECL void BBCALL xClearLogString ( )

Clears log string.

Clears string which contains log messages. This command doesn't clear html log-file or standard output stream (std::cout).

See also:
xGetLogString()
BBDECL void BBCALL xSetLogLevel ( int  level = 2)

Changes logging level.

Logging level controls types of messages to be written to log. See 'Logging level' for more information about logging levels.

Parameters:
levelLogging level
See also:
xGetLogLevel(), xSetLogTarget()
BBDECL void BBCALL xSetLogTarget ( int  target = 1)

Changes logging target.

This function allows you to specify where log messages should be written. See 'Logging output targets' for more information about logging targets.

Parameters:
targetLogging target
See also:
xGetLogTarget(), xSetLogLevel()
BBDECL int BBCALL xGetLogLevel ( )

Returns current logging level.

See also:
xSetLogLevel()
BBDECL int BBCALL xGetLogTarget ( )

Returns current logging target.

See also:
xSetLogTarget()
BBDECL void BBCALL xLogInfo ( const char *  message,
const char *  func = "",
const char *  file = "",
int  line = -1 
)

Adds a Info-styled entry to log system.

This function is useful for making log entries from your own code and watching them along with entries made by Xors3d core.
Func, file and line parameters are displayed in hovering window in HTML format. If func and file are empty and line is -1, the hovering window won't be displayed.

Parameters:
messageThe text of entry to be logged
funcFunction name
fileFile name
lineLine of code
BBDECL void BBCALL xLogMessage ( const char *  message,
const char *  func = "",
const char *  file = "",
int  line = -1 
)

Adds a Message-styled entry to log system.

This function is useful for making log entries from your own code and watching them along with entries made by Xors3d core.
Func, file and line parameters are displayed in hovering window in HTML format. If func and file are empty and line is -1, the hovering window won't be displayed.

Parameters:
messageThe text of entry to be logged
funcFunction name
fileFile name
lineLine of code
BBDECL void BBCALL xLogWarning ( const char *  message,
const char *  func = "",
const char *  file = "",
int  line = -1 
)

Adds a Warning-styled entry to log system.

This function is useful for making log entries from your own code and watching them along with entries made by Xors3d core.
Func, file and line parameters are displayed in hovering window in HTML format. If func and file are empty and line is -1, the hovering window won't be displayed.

Parameters:
messageThe text of entry to be logged
funcFunction name
fileFile name
lineLine of code
BBDECL void BBCALL xLogError ( const char *  message,
const char *  func = "",
const char *  file = "",
int  line = -1 
)

Adds an Error-styled entry to log system.

This function is useful for making log entries from your own code and watching them along with entries made by Xors3d core.
Func, file and line parameters are displayed in hovering window in HTML format. If func and file are empty and line is -1, the hovering window won't be displayed.

Parameters:
messageThe text of entry to be logged
funcFunction name
fileFile name
lineLine of code
BBDECL void BBCALL xLogFatal ( const char *  message,
const char *  func = "",
const char *  file = "",
int  line = -1 
)

Adds a Fatal-styled entry to log system.

This function is useful for making log entries from your own code and watching them along with entries made by Xors3d core.
Func, file and line parameters are displayed in hovering window in HTML format. If func and file are empty and line is -1, the hovering window won't be displayed.

Parameters:
messageThe text of entry to be logged
funcFunction name
fileFile name
lineLine of code