namespace
logginglogging library
Namespaces
- namespace impl
Classes
- class LoggingContext
- Logging context that tracks which logging statements are enabled.
Enums
- enum class Subsystem: uint8_t { Default, gfx, scene, sim, physics, nav, metadata, geo, io, URDF, core, assets, sensor, agent, NumSubsystems }
- Habitat-Sim logging subsystems.
- enum class LoggingLevel: uint8_t { VeryVerbose, Debug, Warning, Error, Verbose = Debug, Quiet = Error }
- Habitat-Sim logging levels. If the logging level for log macro is greater than or equal to the logging level within that subsystem, the log will be printed.
Functions
- auto subsystemFromName(Corrade::Containers::StringView name) -> Subsystem
- auto levelFromName(Corrade::Containers::StringView name) -> LoggingLevel
- auto isLevelEnabled(Subsystem subsystem, LoggingLevel level) -> bool
- Determine if the specified logging level is enabled within a given subsystem.
-
auto buildMessagePrefix(Subsystem subsystem,
const std::
string& filename, const std:: string& function, int line) -> Corrade::Containers::String - Build appropriate prefix for logging messages, including subsystem/namespace, file, line number and function name.
Variables
- const char* subsystemNames constexpr
Enum documentation
enum class esp:: logging:: Subsystem: uint8_t
#include <esp/core/Logging.h>
Habitat-Sim logging subsystems.
These are all subsystems that have different logging levels. They correspond to namespaces. When adding a new subsystem, make sure to add an appropriate loggingSubsystem function (see the ESP_ADD_SUBSYSTEM_FN helper bellow) and add it to subsystemNames.
Enumerators | |
---|---|
Default |
Catch all subsystem that is used when no subsystem is specified. |
gfx |
|
scene |
|
sim |
|
physics |
|
nav |
|
metadata |
|
geo |
|
io |
|
URDF |
|
core |
|
assets |
|
sensor |
|
agent |
|
NumSubsystems |
Not a subsystem. Simply tracks how many subsystems there are. Must always be last |
enum class esp:: logging:: LoggingLevel: uint8_t
#include <esp/core/Logging.h>
Habitat-Sim logging levels. If the logging level for log macro is greater than or equal to the logging level within that subsystem, the log will be printed.
The convience levels, Verbose and Quiet are the primary user facing options. Quiet turns off logging and Verbose is the default and shows things that are generally useful. These names exist such that logging levels can be added and removed without users needed to change what they set logging to.
Enumerators | |
---|---|
VeryVerbose |
|
Debug |
|
Warning |
|
Error |
|
Verbose |
The default logging level. Enables all logging except for the most verbose statements. Habitat-Sim will be fairly verbose in this setting, but not overly so. Note: If you add another level that is lower priority than Debug but should be on by default or Debug is removed/renamed, this will need to be updated. |
Quiet |
Turns of all non-critical logging messages, i.e. those that indicate that something has gone wrong. |
Function documentation
Subsystem esp:: logging:: subsystemFromName(Corrade::Containers::StringView name)
#include <esp/core/Logging.h>
LoggingLevel esp:: logging:: levelFromName(Corrade::Containers::StringView name)
#include <esp/core/Logging.h>
bool esp:: logging:: isLevelEnabled(Subsystem subsystem,
LoggingLevel level)
#include <esp/core/Logging.h>
Determine if the specified logging level is enabled within a given subsystem.
Parameters | |
---|---|
subsystem in | The name of the subsystem. Typically this is returned by espLoggingSubsystem |
level in | The logging level |
Requires an active LoggingContext
Corrade::Containers::String esp:: logging:: buildMessagePrefix(Subsystem subsystem,
const std:: string& filename,
const std:: string& function,
int line)
#include <esp/core/Logging.h>
Build appropriate prefix for logging messages, including subsystem/namespace, file, line number and function name.
Variable documentation
const char* esp:: logging:: subsystemNames constexpr
#include <esp/core/Logging.h>