ModuleFilter

Module level filter.

class DIRAC.Resources.LogFilters.ModuleFilter.ModuleFilter(optionDict)

Bases: object

Filter module to set loglevel per module.

Resources
{
  LogBackends
  {
    <backend>
    {
       Filter = MyModuleFilter
    }
  }
  LogFilters
  {
     MyModuleFilter
     {
        Plugin = ModuleFilter
        dirac = ERROR
        dirac.Subprocess = DEBUG
        dirac.ILCDIRAC.Interfaces.API.NewInterface = INFO
     }
  }
}

This results in all debug messages from the Subprocess module to be printed, but only errors from the rest of dirac. And INFO from a module in an extension. For this to work the global log level needs to be DEBUG (e.g., -ddd for commands)

__init__(optionDict)

Contruct the object, set the base LogLevel to DEBUG, and parse the options.

filter(record)

Filter records based on the path of the logger.