Log-Fine

 view release on metacpan or  search on metacpan

lib/Log/Fine/Levels/Java.pm  view on Meta::CPAN


=item * C<LOGMASK_WARNING>

=item * C<LOGMASK_INFO>

=item * C<LOGMASK_CONFIG>

=item * C<LOGMASK_FINE>

=item * C<LOGMASK_FINER>

=item * C<LOGMASK_FINEST>

=back

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

=cut

use constant MASK_MAP => {
                           LOGMASK_SEVERE  => 2 << LVLTOVAL_MAP->{SEVERE},
                           LOGMASK_WARNING => 2 << LVLTOVAL_MAP->{WARNING},
                           LOGMASK_INFO    => 2 << LVLTOVAL_MAP->{INFO},
                           LOGMASK_CONFIG  => 2 << LVLTOVAL_MAP->{CONFIG},
                           LOGMASK_FINE    => 2 << LVLTOVAL_MAP->{FINE},
                           LOGMASK_FINER   => 2 << LVLTOVAL_MAP->{FINER},
                           LOGMASK_FINEST  => 2 << LVLTOVAL_MAP->{FINEST},
};          # MASK_MAP{}

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

# grab appropriate refs
my $levels = LVLTOVAL_MAP;
my $masks  = MASK_MAP;

# Exported tags
our %EXPORT_TAGS = (macros => [ keys %{$levels} ],
                    masks  => [ keys %{$masks} ]);          # EXPORT_TAGS

# Exported macros
our @EXPORT    = (@{ $EXPORT_TAGS{macros} });
our @EXPORT_OK = (@{ $EXPORT_TAGS{masks} });

# functions okay to export
our %ok_fields = (%{$levels}, %{$masks});

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

=head1 CONSTRUCTOR

=head2 new

Returns a newly constructed object

=cut

sub new
{

        my $class = shift;
        return bless { levelclass => $class }, $class;

}          # new()

# Autoloader
# --------------------------------------------------------------------

sub AUTOLOAD
{

        # Get the method name
        my $name = $AUTOLOAD;

        # Strip out package prefix
        $name =~ s/.*://;

        # Return on DESTROY
        return if $name eq 'DESTROY';

        # make sure we have a valid function
        croak(
               sprintf("[%s] {%s} FATAL : %s\n",
                       strftime("%c", localtime(time)),
                       $AUTOLOAD, "Invalid function name : $name"
               )) unless (exists $ok_fields{$name});

        # Evaluate and return the appropriate level
        eval "sub $name { return $ok_fields{$name} }";
        goto &$name;

}          # AUTOLOAD()

=head1 BUGS

Please report any bugs or feature requests to
C<bug-log-fine at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Log-Fine>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Log::Fine::Levels::Java

You can also look for information at:

=over 4

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Log-Fine>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Log-Fine>

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Fine>

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.255 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )