|
| LogRegistry (LogRegistry const &)=delete |
|
| LogRegistry (LogRegistry &&)=delete |
|
LogRegistry & | operator= (LogRegistry const &)=delete |
|
LogRegistry & | operator= (LogRegistry &&)=delete |
|
OSVR_UTIL_EXPORT LoggerPtr | getOrCreateLogger (const std::string &logger_name) |
| Gets or creates a logger named logger_name . More...
|
|
OSVR_UTIL_EXPORT void | drop (const std::string &name) |
| Drops a logger from the registry. More...
|
|
OSVR_UTIL_EXPORT void | dropAll () |
| Removes all the registered loggers from the registry. More...
|
|
OSVR_UTIL_EXPORT void | flush () |
| Flush all sinks manually.
|
|
OSVR_UTIL_EXPORT void | setPattern (const std::string &pattern) |
| Sets the output pattern on all registered loggers.
|
|
OSVR_UTIL_EXPORT void | setLevel (LogLevel severity) |
| Sets the minimum level of messages to be logged on all registered loggers. More...
|
|
OSVR_UTIL_EXPORT void | setConsoleLevel (LogLevel severity) |
| Sets the minimum level of messages to be logged to the console. More...
|
|
std::string const & | getLogFileBaseName () const |
|
bool | couldOpenLogFile () const |
|
|
static OSVR_UTIL_EXPORT LogRegistry & | instance (std::string const *=nullptr) |
|
|
OSVR_UTIL_EXPORT | LogRegistry (std::string const &logFileBaseName) |
|
§ drop()
void osvr::util::log::LogRegistry::drop |
( |
const std::string & |
name | ) |
|
Drops a logger from the registry.
The logger will survive until the last copy of it is destroyed (e.g., goes out of scope). This function is useful if you want to destroy a logger before the program terminates.
§ dropAll()
void osvr::util::log::LogRegistry::dropAll |
( |
| ) |
|
Removes all the registered loggers from the registry.
Each logger will survive until the last copy of it is destroyed (e.g., goes out of scope).
§ getOrCreateLogger()
LoggerPtr osvr::util::log::LogRegistry::getOrCreateLogger |
( |
const std::string & |
logger_name | ) |
|
Gets or creates a logger named logger_name
.
If the logger named logger_name
already exists, return it, otherwise create a new logger of that name.
- Parameters
-
logger_name | The name of the logger. |
- Todo:
- should this level be different than other levels?
§ setConsoleLevel()
void osvr::util::log::LogRegistry::setConsoleLevel |
( |
LogLevel |
severity | ) |
|
Sets the minimum level of messages to be logged to the console.
- Todo:
- Does it make sense that we must adjust overall level as well in this case?
§ setLevel()
void osvr::util::log::LogRegistry::setLevel |
( |
LogLevel |
severity | ) |
|
Sets the minimum level of messages to be logged on all registered loggers.
- Todo:
- right now this means the filtering is a harmless no-op
The documentation for this class was generated from the following files: