<commit_before>
=head1 NAME

Log::Fine::Levels::Syslog - Provides levels correlating to those provided by Syslog

=head1 SYNOPSIS



=head1 DESCRIPTION



=cut

use strict;
use warnings;

package Log::Fine::Levels::Syslog;

use AutoLoader;
use Carp;
use Exporter;

use base qw/ Log::Fine::Levels Exporter /;

# Necessary for AutoLoader
our $AUTOLOAD;

=head1 CONSTANTS

The following constants are provided:

=head2 LVLTOVAL_MAP

Hash ref mapping level names to their associated numeric values

=cut

# Default level-to-value hash
use constant LVLTOVAL_MAP => {
                               EMER => 0,
                               ALRT => 1,
                               CRIT => 2,
                               ERR  => 3,
                               WARN => 4,
                               NOTI => 5,
                               INFO => 6,
                               DEBG => 7
};          # LVLTOVAL_MAP{}

=head2

Hash ref mapping level values to their associated name

=cut

# Default value-to-level hash
use constant VALTOLVL_MAP => {
                               0 => "EMER",
                               1 => "ALRT",
                               2 => "CRIT",
                               3 => "ERR",
                               4 => "WARN",
                               5 => "NOTI",
                               6 => "INFO",
                               7 => "DEBG"
};          # VALTOLVL_MAP{}

=head2

Hash ref mapping Log Masks to their associated values

=cut

use constant MASK_MAP => {
                           LOGMASK_EMERG   => LVLTOVAL_MAP->{EMER} << 2,
                           LOGMASK_ALERT   => LVLTOVAL_MAP->{ALRT} << 2,
                           LOGMASK_CRIT    => LVLTOVAL_MAP->{CRIT} << 2,
                           LOGMASK_ERR     => LVLTOVAL_MAP->{ERR} << 2,
                           LOGMASK_WARNING => LVLTOVAL_MAP->{WARN} << 2,
                           LOGMASK_NOTICE  => LVLTOVAL_MAP->{NOTI} << 2,
                           LOGMASK_INFO    => LVLTOVAL_MAP->{INFO} << 2,
                           LOGMASK_DEBUG   => LVLTOVAL_MAP->{DEBG} << 2
};          # MASK_MAP{}

# --------------------------------------------------------------------
<commit_msg>Fill in POD documentation for Syslog module<commit_after>
=head1 NAME

Log::Fine::Levels::Syslog - Provides levels correlating to those provided by Syslog

=head1 SYNOPSIS

Defines log level values and masks correlating to those provided by
Syslog.

    use Log::Fine;
    use Log::Fine::Levels::Syslog;

    # grab a logging object
    my $log = Log::Fine->getLogger("foo0");

    # Note that INFO and EMER are provided by the
    # Log::Fine::Levels::Syslog object
    $log->log(INFO, "I'm not mad at you, I'm mad at the dirt");
    $log->log(EMER, "No more wire hangers ... EVER!");

This class may be used as a template for creating customized logging
levels.

=head1 DESCRIPTION

Log::Fine::Levels::Syslog provides logging and mask constants
mimicking those provided by the classic UNIX L<syslog(3)> utility.
This class is also used internally by the L<Log::Fine> utility for
interpreting log levels.

=cut

use strict;
use warnings;

package Log::Fine::Levels::Syslog;

use AutoLoader;
use Carp;
use Exporter;

use base qw/ Log::Fine::Levels Exporter /;

# Necessary for AutoLoader
our $AUTOLOAD;

=head2 Log Levels

Log::Fine::Levels::Syslog bases its log levels on those found in
L<Sys::Syslog>.  The following are exported into the caller's
namespace:

=over 4

=item * C<EMER>

=item * C<ALRT>

=item * C<CRIT>

=item * C<ERR>

=item * C<WARN>

=item * C<NOTI>

=item * C<INFO>

=item * C<DEBG>

=back

=cut

# Default level-to-value hash
use constant LVLTOVAL_MAP => {
                               EMER => 0,
                               ALRT => 1,
                               CRIT => 2,
                               ERR  => 3,
                               WARN => 4,
                               NOTI => 5,
                               INFO => 6,
                               DEBG => 7
};          # LVLTOVAL_MAP{}

# Default value-to-level hash
use constant VALTOLVL_MAP => {
                               0 => "EMER",
                               1 => "ALRT",
                               2 => "CRIT",
                               3 => "ERR",
                               4 => "WARN",
                               5 => "NOTI",
                               6 => "INFO",
                               7 => "DEBG"
};          # VALTOLVL_MAP{}

=head2 Log Masks

Log masks can be exported for use in setting up individual handles
(see L<Log::Fine::Handle>).  The following masks are exported into the
caller's namespace:

=over 4

=item * C<LOGMASK_EMERG>

=item * C<LOGMASK_ALERT>

=item * C<LOGMASK_CRIT>

=item * C<LOGMASK_ERR>

=item * C<LOGMASK_WARNING>

=item * C<LOGMASK_NOTICE>

=item * C<LOGMASK_INFO>

=item * C<LOGMASK_DEBUG>

=back

See L<Log::Fine::Handle> for more information.

=cut

use constant MASK_MAP => {
                           LOGMASK_EMERG   => LVLTOVAL_MAP->{EMER} << 2,
                           LOGMASK_ALERT   => LVLTOVAL_MAP->{ALRT} << 2,
                           LOGMASK_CRIT    => LVLTOVAL_MAP->{CRIT} << 2,
                           LOGMASK_ERR     => LVLTOVAL_MAP->{ERR} << 2,
                           LOGMASK_WARNING => LVLTOVAL_MAP->{WARN} << 2,
                           LOGMASK_NOTICE  => LVLTOVAL_MAP->{NOTI} << 2,
                           LOGMASK_INFO    => LVLTOVAL_MAP->{INFO} << 2,
                           LOGMASK_DEBUG   => LVLTOVAL_MAP->{DEBG} << 2
};          # MASK_MAP{}

# --------------------------------------------------------------------

{'fraction_non_alphanumeric': 0.12696173514371364, 'fraction_numerical': 0.0112854875683301, 'mean_word_length': 1.3791946308724832, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2948886', 'n_tokens_mistral': 1779, 'n_tokens_neox': 1696, 'n_words': 459}