![]() |
OpenVDB 14.0.0
|
Classes | |
| class | ConsoleSink |
| The sink installed by default, writing to std::cerr. More... | |
| struct | LevelScope |
| Sets the level on construction and restores the previous level on destruction. More... | |
| class | Sink |
| Receives formatted log messages. Subclass this to route OpenVDB diagnostics into a host application. More... | |
Enumerations | |
| enum class | Level { Debug = 0 , Info , Warn , Error , Fatal } |
| Message severity level, in increasing order of severity. More... | |
Functions | |
| Level | getLevel () |
| Return the current severity threshold. Messages below this are dropped. | |
| void | setLevel (Level) |
| Set the severity threshold. Messages below this are dropped. | |
| bool | isEnabledFor (Level) |
| Return true if a message of the given level would be logged. | |
| void | setLevel (int &argc, char *argv[]) |
| If "-debug", "-info", "-warn", "-error" or "-fatal" is found in the given array of command-line arguments, set the logging level appropriately and remove the relevant argument(s) from the array. | |
| void | addSink (const Sink::Ptr &) |
| Register a sink. Replaces any existing sink with the same name. | |
| bool | removeSink (const std::string &name) |
| Remove the sink with the given name. Returns true if one was removed. | |
| Sink::Ptr | findSink (const std::string &name) |
| Return the sink with the given name, or nullptr. | |
| void | initialize (bool useColor=ConsoleSink::stderrIsTerminal()) |
| Install the default console sink if no sink has been installed yet. | |
| void | initialize (int &argc, char *argv[], bool useColor=ConsoleSink::stderrIsTerminal()) |
| Initialize and then apply any level flags found in the arguments. | |
|
strong |
| void addSink | ( | const Sink::Ptr & | ) |
Register a sink. Replaces any existing sink with the same name.
| Sink::Ptr findSink | ( | const std::string & | name | ) |
Return the sink with the given name, or nullptr.
| Level getLevel | ( | ) |
Return the current severity threshold. Messages below this are dropped.
| void initialize | ( | bool | useColor = ConsoleSink::stderrIsTerminal() | ) |
Install the default console sink if no sink has been installed yet.
By default, color is enabled only if stderr is connected to a terminal.
| void initialize | ( | int & | argc, |
| char * | argv[], | ||
| bool | useColor = ConsoleSink::stderrIsTerminal() ) |
Initialize and then apply any level flags found in the arguments.
By default, color is enabled only if stderr is connected to a terminal.
| bool isEnabledFor | ( | Level | ) |
Return true if a message of the given level would be logged.
Used by the logging macros to skip formatting a message that would be discarded. This is a single relaxed atomic load.
| bool removeSink | ( | const std::string & | name | ) |
Remove the sink with the given name. Returns true if one was removed.
| void setLevel | ( | int & | argc, |
| char * | argv[] ) |
If "-debug", "-info", "-warn", "-error" or "-fatal" is found in the given array of command-line arguments, set the logging level appropriately and remove the relevant argument(s) from the array.
| void setLevel | ( | Level | ) |
Set the severity threshold. Messages below this are dropped.