Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update docs to handle new log info precedence

  • Loading branch information...
commit 29ceaf069128364503e7ba5ff1434552ab26772b 1 parent 5ffe0ab
Ovid authored Alexis Sukrieh committed
6 lib/Dancer/Config.pm
@@ -491,11 +491,11 @@ B<core>, B<debug>, B<warning> or B<error>.
491 491
492 492 =item B<debug> : all messages are logged
493 493
494   -=item B<warning> : only warning, error and info messages are logged
  494 +=item B<info> : only info, warning and error messages are logged
495 495
496   -=item B<error> : only error and info messages are logged
  496 +=item B<warning> : only warning and error messages are logged
497 497
498   -=item B<info> : only info messages are logged
  498 +=item B<error> : only error messages are logged
499 499
500 500 =back
501 501
8 lib/Dancer/Cookbook.pod
Source Rendered
@@ -772,10 +772,10 @@ Then you can choose which kind of messages you want to actually log:
772 772
773 773 log: 'core' # will log all messages, including messages from
774 774 # Dancer itself
775   - log: 'debug' # will log debug, warning, error and info messages
776   - log: 'warning' # will log warning, error and info messages
777   - log: 'error' # will log error and info messages
778   - log: 'info' # will log only info messages
  775 + log: 'debug' # will log debug, info, warning and error messages
  776 + log: 'info' # will log info, warning and error messages
  777 + log: 'warning' # will log warning and error messages
  778 + log: 'error' # will log error messages
779 779
780 780 If you're using the C<file> logging engine, a directory C<appdir/logs> will be
781 781 created and will host one logfile per environment. The log message contains the
8 lib/Dancer/Introduction.pod
Source Rendered
@@ -399,15 +399,15 @@ start the logger engine in your config.yml
399 399 Then you can choose which kind of messages you want to actually log:
400 400
401 401 log: 'debug' # will log debug, warning, error and info messages
402   - log: 'warning' # will log warning, error and info messages
403   - log: 'error' # will log error and info messages
404   - log: 'info' # will log only info messages
  402 + log: 'info' # will log info, warning and error messages
  403 + log: 'warning' # will log warning and error messages
  404 + log: 'error' # will log error messages
405 405
406 406 A directory appdir/logs will be created and will host one logfile per
407 407 environment. The log message contains the time it was written, the PID of the
408 408 current process, the message and the caller information (file and line).
409 409
410   -To log messages, use the debug, warning, error and info functions. For
  410 +To log messages, use the debug, info, warning and error functions. For
411 411 instance:
412 412
413 413 debug "This is a debug message";
2  lib/Dancer/Logger.pm
@@ -33,9 +33,9 @@ sub _serialize {
33 33
34 34 sub core { defined($logger) and $logger->core( _serialize(@_) ) }
35 35 sub debug { defined($logger) and $logger->debug( _serialize(@_) ) }
  36 +sub info { defined($logger) and $logger->info( _serialize(@_) ) }
36 37 sub warning { defined($logger) and $logger->warning( _serialize(@_) ) }
37 38 sub error { defined($logger) and $logger->error( _serialize(@_) ) }
38   -sub info { defined($logger) and $logger->info( _serialize(@_) ) }
39 39
40 40 1;
41 41
6 lib/Dancer/Logger/Abstract.pm
@@ -133,9 +133,9 @@ sub format_message {
133 133
134 134 sub core { $_[0]->_should('core') and $_[0]->_log('core', $_[1]) }
135 135 sub debug { $_[0]->_should('debug') and $_[0]->_log('debug', $_[1]) }
  136 +sub info { $_[0]->_should('info') and $_[0]->_log('info', $_[1]) }
136 137 sub warning { $_[0]->_should('warning') and $_[0]->_log('warning', $_[1]) }
137 138 sub error { $_[0]->_should('error') and $_[0]->_log('error', $_[1]) }
138   -sub info { $_[0]->_should('info') and $_[0]->_log('info', $_[1]) }
139 139
140 140 1;
141 141
@@ -265,8 +265,8 @@ application to die.
265 265
266 266 =head2 _should
267 267
268   -Checks a certain level number against a certain level type (core, debug,
269   -warning, error, info).
  268 +Checks a certain level number against a certain level type (core, debug, info
  269 +warning, error).
270 270
271 271 =head1 AUTHOR
272 272
4 script/dancer
@@ -933,9 +933,9 @@ template: \"simple\"
933 933 # file: log message to a file in log/
934 934 logger: \"console\"
935 935
936   -# the log level for this environement
  936 +# the log level for this environment
937 937 # core is the lowest, it shows Dancer's core log messages as well as yours
938   -# (debug, warning and error)
  938 +# (debug, info, warning and error)
939 939 log: \"core\"
940 940
941 941 # should Dancer consider warnings as critical errors?

0 comments on commit 29ceaf0

Please sign in to comment.
Something went wrong with that request. Please try again.