GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Dancer::Logger::LogReport(3) User Contributed Perl Documentation Dancer::Logger::LogReport(3)

Dancer::Logger::LogReport - reroute Dancer logs into Log::Report

 Dancer::Logger::LogReport
   is a Dancer::Logger::Abstract

 Dancer::Logger::LogReport
   is a Exporter

  # When your main program is not a Dancer object
  use My::Dancer::App;
  use Log::Report;
  ... start dispatcher ...
  error "something is wrong";   # Log::Report::error()

  # When your main program is a Dancer object
  use Dancer;
  use Dancer::Logger::LogReport;
  use Log::Report import => 'dispatcher';
  ... start dispatcher ...
  error "something is wrong";   # Dancer::error()

  # In any case, your main program needs to start log dispatcers
  # Both Dancer and other Log::Report based modules will send
  # their messages here:
  dispatcher FILE => 'default', ...;

  # In your config
  logger: log_report
  logger_format: %i%m   # keep it simple
  log: debug            # filtered by dispatchers

The Log::Report exception/translation framework defines a large number of logging back-ends. The same log messages can be sent to multiple destinations at the same time via flexible dispatchers. When you use this logger in your Dancer application, it will nicely integrate with non-Dancer modules which need logging.

Many log back-ends, like syslog, have more levels of system messages. Modules who explicitly load this module can use the missing "assert", "notice", "panic", and "alert" log levels. The "trace" name is provided as well: when you are debugging, you add a 'trace' to your program... its just a better name than 'debug'.

You probably want to set a very simple "logger_format", because the dispatchers do already add some of the fields that the default "simple" format adds. For instance, to get the filename/line-number in messages depends on the dispatcher 'mode' (f.i. 'DEBUG').

You also want to set the log level to "debug", because level filtering is controlled per dispatcher (as well)

This module is part of Log-Report distribution version 1.33, built on July 17, 2021. Website: http://perl.overmeer.net/CPAN/

Copyrights 2007-2021 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

2021-07-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.