moduleLogLevel

This template returns the LogLevel named "logLevel" of type LogLevel defined in a user defined module where the filename has the suffix "_loggerconfig.d". This LogLevel sets the minimal LogLevel of the module.

A minimal LogLevel can be defined on a per module basis. In order to define a module LogLevel a file with a modulename "MODULENAME_loggerconfig" must be found. If no such module exists and the module is a nested module, it is checked if there exists a "PARENT_MODULE_loggerconfig" module with such a symbol. If this module exists and it contains a LogLevel called logLevel this LogLevel will be used. This parent lookup is continued until there is no parent module. Then the moduleLogLevel is LogLevel.all.

  1. template moduleLogLevel(string moduleName)
    template moduleLogLevel (
    string moduleName
    ) if (
    !moduleName.length
    ) {
    enum moduleLogLevel;
    }
  2. template moduleLogLevel(string moduleName)

Examples

static assert(moduleLogLevel!"" == LogLevel.all);
static assert(moduleLogLevel!"not.amodule.path" == LogLevel.all);

Meta

Suggestion Box / Bug Report