Dancer...stract(3pm)

πŸŽ€ Dancer::Logger::Abstract(3pm) β€” the vibe

okay bestie, so like… this is Dancer::Logger::Abstract, an abstract logging engine for Dancer πŸ’– it's a Perl module, it lives in the User Contributed Perl Documentation corner of your man pages, and it's version 1.3522 ✨


✨ SYNOPSIS ✨

so in your configuration file you'd write something like this, no cap:

# default
logger_format: simple
# [1234] debug @0.12> [hit #123]message from your log in File.pm line 12

# custom
logger_format: %m %{%H:%M}t [%{accept_type}h]
# message from your log [11:59] [text/html]

like, simple gets you that default look, and if you're feeling ✨custom✨ you build your own lil format string out of the pieces below. the comments in there? they're literally showing you what the output ends up looking like 🫢


πŸ’… DESCRIPTION πŸ’…

This is an abstract logging engine that provides loggers with basic functionality and some sanity checking ✨

it's giving "foundation" energy β€” it's the base every other Dancer logger builds on, and it does the sanity checks so you don't have to πŸ™ˆ


🌸 CONFIGURATION 🌸

logger_format

This is a format string (or a preset name) to specify the log format πŸ’–

The possible values are:

  • %h β€” host emitting the request 🌐
  • %t β€” date (local timezone, formatted like %d/%b/%Y %H:%M:%S) ⏰
  • %T β€” date (local timezone, formatted like %Y-%m-%d %H:%M:%S) πŸ•
  • %u β€” date (UTC timezone, formatted like %d/%b/%Y %H:%M:%S) 🌍
  • %U β€” date (UTC timezone, formatted like %Y-%m-%d %H:%M:%S) 🌎
  • %P β€” PID πŸ”’
  • %L β€” log level πŸ“Š
  • %D β€” timer ⏱️
  • %m β€” message πŸ’¬
  • %f β€” file name that emit the message πŸ“„
  • %l β€” line from the file πŸ“
  • %i β€” request ID πŸ†”
  • %{$fmt}t β€” timer formatted with a valid time format ⏳
  • %{header}h β€” header value πŸ“¨

There is currently a single preset log format:

  • simple β€” will format the message like: [%P] %L @%D> %i%m in %f l. %l
periodt πŸ’… that simple preset is the one you get by default, so if you never touch logger_format that's the vibe you're logging in.

πŸ”₯ METHODS πŸ”₯

format_message

Provides a common message formatting πŸ’– (it's the shared lil helper that does the actual formatting work)

core

Logs messages as core πŸ‘‘

debug

Logs messages as debug πŸ›

warning

Logs messages as warning ⚠️

error

Logs messages as error 🚨

info

Logs messages as info ℹ️

_log

A method to override. If your logger does not provide this, it will cause the application to die πŸ’€

not me writing a logger and forgetting _log… bestie your whole app just dies. no cap. override it or perish 😭

_should

Checks a certain level number against a certain level type (core, debug, info warning, error) βœ…


πŸ‘‘ AUTHOR πŸ‘‘

Dancer Core Developers πŸ’œ


This software is copyright (c) 2010 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πŸ¦‹


and that's the whole page, bestie 🫢 this was perl v5.40.1, dated 2026-05-05, and this manual page right here is Dancer::Logger::Abstract(3pm) ⭐ slay, go log something iconic πŸ’…βœ¨

πŸ“¦ where this page comes from