Spandex v1.3.4 Spandex.Logger View Source
Passes arguments on to the default logger, but wraps those calls in spans. When functions are provided, it wraps those functions in spans as well.
Link to this section Summary
Functions
Mirrors calls to Logger.debug/2
, but spans the calls
Mirrors calls to Logger.error/2
, but spans the calls
Mirrors calls to Logger.info/2
, but spans the calls
Mirrors calls to Logger.warn/2
, but spans the calls
Link to this section Functions
Mirrors calls to Logger.debug/2
, but spans the calls
The first argument: resource
, is used to aggregate the data in trace tools,
and sets the resource
of the span. The fourth argument is used to avoid sending logs that might be sent often or are unimportant. More info on levels in the documentation. This also prepends the resource passed in
to the message of your logs. This is made inexpensive by use of iolists, as
opposed to actual string appending operations.
NOTICE
- Only accepts functions as its second parameter.
- Does NOT run the provided function if the log level does not line up, unlike the normal logger
Mirrors calls to Logger.error/2
, but spans the calls
The first argument: resource
, is used to aggregate the data in trace tools,
and sets the resource
of the span. The fourth argument is used to avoid sending logs that might be sent often or are unimportant. More info on levels in the documentation. This also prepends the resource passed in
to the message of your logs. This is made inexpensive by use of iolists, as
opposed to actual string appending operations.
NOTICE
- Only accepts functions as its second parameter.
- Does NOT run the provided function if the log level does not line up, unlike the normal logger
Mirrors calls to Logger.info/2
, but spans the calls
The first argument: resource
, is used to aggregate the data in trace tools,
and sets the resource
of the span. The fourth argument is used to avoid sending logs that might be sent often or are unimportant. More info on levels in the documentation.
This also prepends the resource passed in
to the message of your logs. This is made inexpensive by use of iolists, as
opposed to actual string appending operations.
NOTICE
- Only accepts functions as its second parameter.
- Does NOT run the provided function if the log level does not line up, unlike the normal logger
Mirrors calls to Logger.warn/2
, but spans the calls
The first argument: resource
, is used to aggregate the data in trace tools,
and sets the resource
of the span. The fourth argument is used to avoid sending logs that might be sent often or are unimportant. More info on levels in the documentation. This also prepends the resource passed in
to the message of your logs. This is made inexpensive by use of iolists, as
opposed to actual string appending operations.
NOTICE
- Only accepts functions as its second parameter.
- Does NOT run the provided function if the log level does not line up, unlike the normal logger