Class ILogConfiguration

Inheritance Relationships

Derived Type

Class Documentation

class Microsoft::Applications::Events::ILogConfiguration

The ILogConfiguration class contains LogManager-specific configuration settings

Subclassed by Microsoft::Applications::Events::ModuleLogConfiguration

Public Functions

ILogConfiguration() = default

Construct an empty configuration

ILogConfiguration(const std::initializer_list<VariantMap::value_type> &initList)

Construct a pre-populated configuration

Parameters

initList – Initializer list of key/value config settings

void AddModule(const char *key, const std::shared_ptr<IModule> &module)

Add a module to the log configuration

Parameters
  • key – Module name

  • module – Module instance

std::shared_ptr<IModule> GetModule(const char *key)

Get a module by name

Parameters

key – Module name

Returns

Module instance if set, else null

std::map<std::string, std::shared_ptr<IModule>> &GetModules()

Access underlying modules map

bool HasConfig(const char *key)

Check if a config value has been set

Parameters

keyConfig name

Returns

True if config value exists, else false

Variant &operator[](const char *key)

Get a config value by name, creating a new value if one doesn’t already exist

Parameters

keyConfig name

Returns

Config value

VariantMap &operator*()

Access underlying VariantMap