-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow log level override using OPAN_LOG_LEVEL
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,7 +394,7 @@ get '/autopin/authors/id/*dist_path' => sub { | |
return $_[0]->render(text => 'Not found', status => 404); | ||
}; | ||
|
||
caller() ? app : app->tap(sub { shift->log->level('fatal') })->start; | ||
caller() ? app : app->tap(sub { shift->log->level($ENV{OPAN_LOG_LEVEL} || 'fatal') })->start; | ||
|
||
=head1 NAME | ||
|
@@ -665,6 +665,11 @@ www.cpan.org. Remember that if you need to temporarily overlay your overlay | |
but only for one user, there's nothing stopping you setting OPAN_MIRROR to | ||
another opan. | ||
=head2 logging | ||
The default log level is C<fatal>. Set the ENV var OPAN_LOG_LEVEL to one of | ||
the log levels accepted by L<Mojo::Log>, like C<warn>, C<info> or C<debug>. | ||
=head1 AUTHOR | ||
Matt S. Trout (mst) <[email protected]> | ||
|