NAME

EventStore::Tiny::Logger

REFERENCE

EventStore::Tiny::Logger implements the following attributes and methods.

$log->print_target(*{STDERR});

Set or get the print target of this logger. By default it uses the "select"ed file handle (normally STDOUT) but everything with a print method will do.

log_event

$log->log_event($event);

Logs the type name together with a dump of the concrete data of the given event to its print_target.

log_cb

# As a method
$store->logger($log->log_cb);

# As a procedure
$store->logger(EventStore::Tiny::log_cb);

Generates a subref which can be used as a logger of an event store. If called as a method, it returns a subref which uses the current Logger (together with the set print_target). If called as a procedure or class method, it returns a closure to the log method of a fresh anonymous Logger instance.

SEE ALSO

EventStore::Tiny

COPYRIGHT AND LICENSE

Copyright (c) 2018-2021 Mirko Westermeier (mail: mirko@westermeier.de)

Released under the MIT License (see LICENSE.txt for details).