Function mir::logging::create_tag

Function Documentation

Tag const &mir::logging::create_tag(Tag const &parent, std::string_view name)

Create a tag for use in logging.

This creates a new tag and registers it with the logging subsystem, with lifetime of the whole process. It should be called exactly once for each desired tag and the reference it returns stored.

Valid tag names consist of lowercase ASCII (‘a’-‘z’), ‘_’, or ‘-’ characters.

For leaf tags — tags not used as a parent or which are only used in a single translation unit, it is suggested that this be called at global scope so that the tag is registered with the logging subsystem during server initialisation. Eg:

static Tag const& bypass = mir::logging::create_tag(logging::graphics(), "bypass");