handler-actions: predefined handler actions

Description Usage Arguments Details Examples

Description

when you define a handler, you specify its name and the associated action. a few predefined actions are provided and this page documents them.

Usage

1
2
writeToFile(msg, handler, ...)
writeToConsole(msg, handler, ...)

Arguments

msg

the final formatted message to be output

handler

the handler owning this action

...

placeholder: accept any extra future parameter.

Details

a handler action is a function taking two parameters: the formatted log record and the handler to which the action is associated. the second parameter is useful so you can register the same handler action to handlers with different properties.

Examples

1
2
3
## define your own function and register it with a handler.
## author is planning a sentry client function.  please send 
## any interesting function you may have written!

logging documentation built on May 2, 2019, 4:46 p.m.