ErrorHandling.rst edited online with Bitbucket: Trying to fix syntax highlighting in user manual.
This commit is contained in:
parent
2203e30f39
commit
2010b46709
@ -9,7 +9,7 @@ PolyVox has a simple logging mechanism which allows it to write messages with an
|
||||
|
||||
The following functions are called at various points in the PolyVox codebase:
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block :: c++
|
||||
|
||||
void logDebug (const std::string& message);
|
||||
void logInfo (const std::string& message);
|
||||
@ -21,13 +21,13 @@ Fatal messages are only issued in non-recoverable scenarios when the application
|
||||
|
||||
PolyVox defines a LogHandler function pointer which looks like this:
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block :: c++
|
||||
|
||||
typedef void (*LogHandler)(const std::string& message, LogLevel logLevel);
|
||||
|
||||
There is a function called 'defaultLogHandler()' which matches this signature and writes the messages to cout/cerr (note that it suppresses Debug messages). To redirect log messages you can write your own fuction which matches this signature and the apply it with setLogHandler:
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block :: c++
|
||||
|
||||
setLogHandler(&myLogHandler);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user