Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mar-kolya/timed-logger-dancer-adoptplack
https://github.com/mar-kolya/timed-logger-dancer-adoptplack
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mar-kolya/timed-logger-dancer-adoptplack
- Owner: mar-kolya
- Created: 2013-09-19T15:31:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-03T04:11:16.000Z (about 11 years ago)
- Last Synced: 2023-03-12T07:23:47.034Z (over 1 year ago)
- Language: Perl
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
Awesome Lists containing this project
README
package Timed::Logger::Dancer::AdoptPlack;
use 5.16.0;
use strict;
use warnings;use Moose;
use Plack::Middleware::Timed::Logger;
use Dancer qw();=head1 NAME
Timed::Logger::Dancer::AdoptPlack - Use Plack Timed::Logger Middleware with Dancer
=head1 VERSION
Version 0.0.5
=cut
our $VERSION = '0.0.5';
=head1 SYNOPSIS
use Timed::Logger::Dancer::AdoptPlack;
my $logger = Timed::Logger::Dancer::AdoptPlack->logger;
my $log_entry = $logger->start('DB');
...=head1 DESCRIPTION
This module bridges L middleware L with
L application. It provides method of getting and instance of L
to log events. Those events can be later displayed by L
debug panel.This module was inspired by L.
=head1 SUBROUTINES
=head2 logger
Static method to get a L instance.
=cut
sub logger {
my $request = Dancer->request;
return Plack::Middleware::Timed::Logger->get_logger_from_env($request ? $request->env : {});
}=head1 SEE ALSO
L, L,
L, L=head1 AUTHOR
Nikolay Martynov, C<< >>
=head1 BUGS
Please report any bugs or feature requests to C, or through
the web interface at L.
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 Timed::Logger::Dancer::AdoptPlack
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker (report bugs here)
L
=item * AnnoCPAN: Annotated CPAN documentation
L
=item * CPAN Ratings
L
=item * Search CPAN
L
=back
=head1 ACKNOWLEDGEMENTS
Logan Bell and Belden Lyman.
=head1 LICENSE AND COPYRIGHT
Copyright 2013 Nikolay Martynov and Shutterstock Inc (http://shutterstock.com). All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.See L for more information.
=cut
1; # End of Timed::Logger::Dancer::AdoptPlack