lsst.dax.apdb g5ea96fc03c+341ea1ce94
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lsst.dax.apdb.monitor.LoggingMonHandler Class Reference
Inheritance diagram for lsst.dax.apdb.monitor.LoggingMonHandler:
lsst.dax.apdb.monitor.MonHandler

Public Member Functions

 __init__ (self, str logger_name, int log_level=logging.INFO)
 
None handle (self, str name, float timestamp, _TagsType tags, Mapping[str, Any] values, str agent_name)
 

Protected Attributes

 _logger
 
 _level
 

Detailed Description

Implementation of the monitoring handler which dumps records formatted
as JSON objects to `logging`.

Parameters
----------
logger_name : `str`
    Name of the `logging` logger to use for output.
log_level : `int`, optional
    Logging level to use for output, default is `INFO`

Notes
-----
The attributes of the formatted JSON object correspond to the parameters
of `handle` method, except for `agent_name` which is mapped to `source`.
The `tags` and `values` become JSON sub-objects with corresponding keys.

Member Function Documentation

◆ handle()

None lsst.dax.apdb.monitor.LoggingMonHandler.handle ( self,
str name,
float timestamp,
_TagsType tags,
Mapping[str, Any] values,
str agent_name )
Handle one monitoring record.

Parameters
----------
name : `str`
    Record name, arbitrary string.
timestamp : `str`
    Time in seconds since UNIX epoch when record originated.
tags : `~collections.abc.Mapping` [`str`, `str` or `int`]
    Tags associated with the record, may be empty.
values : `~collections.abc.Mapping` [`str`, `Any`]
    Values associated with the record, usually never empty.
agent_name `str`
    Name of a client agent that produced this record.

Reimplemented from lsst.dax.apdb.monitor.MonHandler.


The documentation for this class was generated from the following file: