Skip to content

Commit

Permalink
better Mojo::Log descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 30, 2011
1 parent 39de890 commit 2b0f256
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.18 2011-10-30 00:00:00
- Improved documentation.

2.17 2011-10-30 00:00:00
- Fixed bug in "user_agent.t".

Expand Down
23 changes: 20 additions & 3 deletions lib/Mojo/Log.pm
Expand Up @@ -102,6 +102,7 @@ Mojo::Log - Simple logger for Mojo
level => 'warn',
);
# Log messages
$log->debug("Why isn't this working?");
$log->info("FYI: it happened again");
$log->warn("This might be a problem");
Expand Down Expand Up @@ -140,15 +141,31 @@ L<Mojo::Log> implements the following attributes.
my $handle = $log->handle;
$log = $log->handle(IO::File->new);
Logfile handle used by default C<message> event, defaults to opening C<path>
or C<STDERR>.
Logfile handle used by default C<message> event, defaults to opening the
value of C<path> or C<STDERR>.
=head2 C<level>
my $level = $log->level;
$log = $log->level('debug');
Active log level.
Active log level, defaults to C<debug>.
These levels are currently available:
=over 2
=item C<debug>
=item C<info>
=item C<warn>
=item C<error>
=item C<fatal>
=back
=head2 C<path>
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -35,7 +35,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.17';
our $VERSION = '2.18';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/user_agent.t
Expand Up @@ -206,7 +206,7 @@ is $finished, 1, 'finish event has been emitted';
is $tx->res->code, 200, 'right status';
is $tx->res->body, 'works', 'right content';

# GET /no_length (missing Content-Lengt header)
# GET /no_length (missing Content-Length header)
$tx = $ua->get('/no_length');
ok $tx->success, 'successful';
ok !$tx->error, 'no error';
Expand Down

0 comments on commit 2b0f256

Please sign in to comment.