til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Enable logging

Just add a directory named log to you application root folder.

$ cd my_app
$ mkdir log

However this tip does not seem to work with newer version of Mojolicious, so you might have to add the following to your application.

Mojolicious::Lite

use Mojo::Log;

my $log = Mojo::Log->new( path => 'log/development.log', level => 'debug' );
app->log($log);

Mojolicious Application

use Mojo::Log;

# Log to STDERR
my $log = Mojo::Log->new;

# Customize log file location and minimum log level
my $log = Mojo::Log->new(path => '/var/log/mojo.log', level => 'warn');

Above example lifted from Mojo::Log

Resources and References