https://github.com/xsawyerx/log-dispatch-screen-gentoo
Gentoo-colored screen logging output
https://github.com/xsawyerx/log-dispatch-screen-gentoo
logging perl perl5
Last synced: 12 months ago
JSON representation
Gentoo-colored screen logging output
- Host: GitHub
- URL: https://github.com/xsawyerx/log-dispatch-screen-gentoo
- Owner: xsawyerx
- Created: 2017-03-03T21:38:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-22T06:38:31.000Z (over 6 years ago)
- Last Synced: 2025-07-20T20:05:04.637Z (12 months ago)
- Topics: logging, perl, perl5
- Language: Perl
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Log::Dispatch::Screen::Gentoo - Gentoo-colored screen logging output
# VERSION
version 0.003
# SYNOPSIS
use Log::Dispatch;
my $log = Log::Dispatch->new(
'outputs' => [
[
'Screen::Gentoo',
'min_level' => 'debug',
'stderr' => 1,
'newline' => 1,
],
],
);
$log->info('Information');
$log->warning('Uh oh!');
$log->critical('No oh!');
# DESCRIPTION
This implements a colorful output that uses [Term::GentooFunctions](https://metacpan.org/pod/Term::GentooFunctions) to
print out the output.
It also works with indentation when using `eindent` and `eoutdent` from
[Term::GentooFunctions](https://metacpan.org/pod/Term::GentooFunctions).
If you have [Unicode::UTF8](https://metacpan.org/pod/Unicode::UTF8) available, it will use that to support UTF-8
character encodings. (This is much faster than [Encode](https://metacpan.org/pod/Encode).)
One limitation this has is that there are only three colors, which means
that you cannot see a difference between levels `debug`, `notice`, and
`info` which all have a green color, or between `error`, `critical`,
`alert`, and `emergency` which all have a red color.
At least for now.
# SEE ALSO
- [Log::Dispatch::Screen::Color](https://metacpan.org/pod/Log::Dispatch::Screen::Color)
Colors entire lines, not just the beginning. Try it out.
- [Unicode::UTF8](https://metacpan.org/pod/Unicode::UTF8)
# AUTHOR
Sawyer X
# COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Sawyer X.
This is free software, licensed under:
The MIT (X11) License