-
-
13 Feb 2018 13:37:13 UTC
- Distribution: Piper
- Module version: 0.05
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (622 / 0 / 0)
- Kwalitee
Bus factor: 0- 97.29% Coverage
- License: apache_2_0
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (53.74KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Piper::Role::Logger - Role for logging and debugging in the Piper system
DESCRIPTION
The role exists to support future subclassing and testing of the logging mechanism used by Piper.
REQUIRES
This role requires the definition of the below methods, each of which will be provided the following arguments:
$segment # The pipeline segment calling the method $message # The message sent (a string) @items # Items that provide context to the message
DEBUG
This method is only called if the debug level of the segment is greater than zero.
ERROR
This method should cause a
die
orcroak
. It will do so automatically if not done explicitly, though with an extremely generic and unhelpful message.INFO
This method is only called if either the verbosity or debug levels of the segment are greater than zero.
WARN
This method should issue a warning (such as
warn
orcarp
).UTILITY METHODS
debug_level($segment)
verbose_level($segment)
These methods should be used to determine the appropriate debug and verbosity levels for the logger. They honor the following environment variable overrides (if they exist) before falling back to the appropriate levels set by the given
$segment
:PIPER_DEBUG PIPER_VERBOSE
SEE ALSO
VERSION
version 0.05
AUTHOR
Mary Ehlers <ehlers@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2017 by Mary Ehlers.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
Module Install Instructions
To install Piper, copy and paste the appropriate command in to your terminal.
cpanm Piper
perl -MCPAN -e shell install Piper
For more information on module installation, please visit the detailed CPAN module installation guide.