|
NAMEVenus::Log - Log Class ABSTRACTLog Class for Perl 5 SYNOPSISpackage main; use Venus::Log; my $log = Venus::Log->new; # $log->trace(time, 'Something failed!'); # "0000000000 Something failed!" # $log->error(time, 'Something failed!'); # "0000000000 Something failed!" DESCRIPTIONThis package provides methods for logging information using various log levels. The default log level is trace. Acceptable log levels are "trace", "debug", "info", "warn", "error", and "fatal", and the set log level will handle events for its level and any preceding levels in the order specified. ATTRIBUTESThis package has the following attributes: handlerhandler(coderef $code) (coderef) The handler attribute holds the callback that handles logging. The handler is passed the log level and the log messages. Since 1.68
levellevel(string $name) (string) The level attribute holds the current log level. Valid log levels are "trace", "debug", "info", "warn", "error" and "fatal", and will emit log messages in that order. Invalid log levels effectively disable logging. Since 1.68
separatorseparator(any $data) (any) The separator attribute holds the value used to join multiple log message arguments. Since 1.68
INHERITSThis package inherits behaviors from: Venus::Kind::Utility INTEGRATESThis package integrates behaviors from: Venus::Role::Buildable METHODSThis package provides the following methods: debugdebug(string @data) (Venus::Log) The debug method logs "debug" information and returns the invocant. Since 1.68
errorerror(string @data) (Venus::Log) The error method logs "error" information and returns the invocant. Since 1.68
fatalfatal(string @data) (Venus::Log) The fatal method logs "fatal" information and returns the invocant. Since 1.68
infoinfo(string @data) (Venus::Log) The info method logs "info" information and returns the invocant. Since 1.68
inputinput(string @data) (string) The input method returns the arguments provided to the log level methods, to the "output", and can be overridden by subclasses. Since 1.68
outputoutput(string @data) (string) The output method returns the arguments returned by the "input" method, to the log handler, and can be overridden by subclasses. Since 1.68
stringstring(any $data) (string) The string method returns a stringified representation of any argument provided and is used by the "output" method. Since 1.68
tracetrace(string @data) (Venus::Log) The trace method logs "trace" information and returns the invocant. Since 1.68
warnwarn(string @data) (Venus::Log) The warn method logs "warn" information and returns the invocant. Since 1.68
writewrite(string $level, any @data) (Venus::Log) The write method invokes the log handler, i.e. "handler", and returns the invocant. Since 1.68
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (C) 2022, Awncorp, "awncorp@cpan.org". This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
|