Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hypnotoad Logfile

Does Hypnotoad write any Logfile? I can't find anything about that here: http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad Also the option --help says nothing about it.

I understand, that application-wise I need to use stuff like $self->app->log->error('aua!')... but something like a server log does not exist? (e.g. client requests, internal errors, etc)

If the answer is just no, I'm fine. This would then mean, that I would need to implement this in my application I guess. I can imagine that it makes sense to keep server-code small and clean here, maybe this would be the reason for a lack of this functionality? Or is it that I can enable it?

like image 956
Boris Däppen Avatar asked Aug 19 '13 12:08

Boris Däppen


3 Answers

I don't think so, but it's easy to set one up.

use Mojo::Log;
...
app->log( Mojo::Log->new( path => <filename>, level => 'debug' ) );
...
app->start;
like image 56
mob Avatar answered Nov 19 '22 10:11

mob


app->log( Mojo::Log->new( path => , level => 'debug' ) );

Insert it to startup function

like image 32
thekostya Avatar answered Nov 19 '22 11:11

thekostya


If your application has a log folder, the log will be written there: http://mojolicio.us/perldoc/Mojolicious/Guides/Tutorial#Mode

like image 24
Joel Berger Avatar answered Nov 19 '22 10:11

Joel Berger