khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
61 stars 30 forks source link

Raisin::Logger documentation contradicts itself #34

Closed djzort closed 7 years ago

djzort commented 7 years ago

The documentation for the ::Logger class presents a contradiction.

The synopsis says:

my $logger = Raisin::Logger->new;
$logger->log(info => 'Hello, world!');

But 'info' isn't an option, according to the log() method entry:

METHODS
log
Accept's two parameters: level and message.
khrt commented 7 years ago

Hi @djzort,

don't really get your point. You pass an array to Raisin::Logger->log() method, where first argument is level, and the second one is message.

In the log method you can see it converts array to hash, and then prints to filehandle https://github.com/khrt/Raisin/blob/master/lib/Raisin/Logger.pm#L12

I do not consider this as a bug, so I'm closing it. Feel free to re-open if you have any concerns.