A software tool designed to enable developers to send log messages from an application built with the Mojolicious web framework to various output targets, including files, email, and syslog. The tool offers flexibility in configuring log levels and formatting.
One of the key features of MojoX::Log::Dispatch is its ability to include log statements at different levels throughout the code base. Users can then create a new logging object and set the minimum log level they want to track. For instance, they can set the log level to 'debug' during development and set it higher in production.
To get started with MojoX::Log::Dispatch, users can utilize the SYNOPSIS code provided by the module. This code creates a Log::Dispatch with a logging object that defaults to log to STDERR or to a file if the path attribute exists. The code also contains examples of adding exotic loggers and logging at various levels.
For those using Mojo::Log in their app, they can create a customized logger object that Mojo/Mojolicious can utilize, usually by adding it in the "startup" sub in Mojolicious. This can be done with the use of the MojoX::Log::Dispatch module and the Log::Dispatch::Syslog module. With this setup, users can add the customized logger object and then log as usual.
Overall, MojoX::Log::Dispatch is a useful Perl module for managing loggers and logging levels. Its ability to add and remove output objects and include log statements at different levels makes it ideal for different use cases, including development and production.
Version 0.06: N/A