Net::Libwebsockets::Logger - Contextual logging
my $logger = Net::Libwebsockets::Logger->new( level => Net::Libwebsockets::LLL_ERR | Net::Libwebsockets::LLL_WARN, callback => sub ($level, $message) { # $level is one of LLL_ERR et al. }, );
This class implements a LWS contextual logger, as Net::Libwebsockets’s main documentation describes.
Instantiates CLASS. %OPTS are all optional:
level - A bitwise-OR of various LLL_* constants from Net::Libwebsockets. Defaults to LWS’s global log level at instantiation time.
level
LLL_*
callback - A coderef that receives 2 arguments: the message’s log level (should match a LLL_* constant), and the message itself. Defaults to LWS’s own default behavior.
callback
To install Net::Libwebsockets, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Libwebsockets
CPAN shell
perl -MCPAN -e shell install Net::Libwebsockets
For more information on module installation, please visit the detailed CPAN module installation guide.