diff options
author | Steve Vinoski <[email protected]> | 2010-02-28 00:13:10 -0500 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-05-12 07:40:26 +0200 |
commit | 6281020ef3ac85afbfbe811de662ae5e1f19901d (patch) | |
tree | bb1c66bc55011631d0ba706908a8e917e6ab754c /lib/stdlib/test/base64_SUITE.erl | |
parent | 5ec0ade4105d5d72f318b657bff1a628881cbf9d (diff) | |
download | otp-6281020ef3ac85afbfbe811de662ae5e1f19901d.tar.gz otp-6281020ef3ac85afbfbe811de662ae5e1f19901d.tar.bz2 otp-6281020ef3ac85afbfbe811de662ae5e1f19901d.zip |
Add support for the format_status callback to gen_event
The gen_server and gen_fsm behaviors support the format_status
callback to allow developers to specialize how callback module state
appears within the return value of sys:get_status and within logged
output resulting from abnormal process termination. This patch adds
similar support to gen_event.
Event handlers that export a format_status/2 function, which is an
optional callback, and are registered with an event manager will now
have their format_status callbacks invoked when sys:get_status is
called on the event manager. The term returned from format_status for
this case replaces the default handler state in the sys:get_status
return value.
This patch also extends gen_event to call an event handler's
format_status function (if it exports one) should the handler
terminate abnormally. The term returned from format_status is logged
in place of the handler's state. This is intended to allow developers
to control how much output is logged in the case of abnormal
termination.
The documentation is appropriately extended and new unit tests are
added to cover the new gen_event format_status functionality.
Diffstat (limited to 'lib/stdlib/test/base64_SUITE.erl')
0 files changed, 0 insertions, 0 deletions