Dancer2...er::File(3)
π Dancer2::Logger::File β the file-based logging engine for Dancer2 π
okay bestie, so this is a page from the User Contributed Perl Documentation collection, and it's literally all about Dancer2::Logger::File, the logging engine that lets your Dancer2 app dump its logs into actual files on disk. yes queen, files. on disk. slay. β¨
πΈ VERSION πΈ
version 2.2.1 β periodt, that's the one we're working with. π
π¦ DESCRIPTION π¦
This is a logging engine that allows you to save your logs to files on disk. it's giving "i want receipts of everything my app did" and honestly? iconic.
β οΈ okay so listen β logs are not automatically rotated. no cap. if you let them pile up they will just keep growing forever like my to-do list π. the move is to use a log rotation tool likelogrotateincopytruncatemode. that's the vibe. don't skip this part fr fr.
β¨ METHODS β¨
π log($level, $message)
Writes the log message to the file. that's it, that's the whole method, and she ate. π«Ά
π CONFIGURATION π
so to actually use this logging engine in your Dancer2 app, the setting logger needs to be set to File. that's the unlock, iykyk π
the following attributes are supported:
log_dirβ the directory path that holds your log files. defaults tologsin the application directory. like, it just goes and chills inlogsunless you tell it otherwise πfile_nameβ the name of the log file. defaults to the environment name with a.logsuffix. cute, consistent, we love her π
here's an example configuration that uses this logger and stores logs in /var/log/myapp β look at her go:
logger: "File"
engines:
logger:
File:
log_dir: "/var/log/myapp"
file_name: "myapp.log"
main character configuration honestly π
π AUTHOR π
Dancer Core Developers β the collective legends. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 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. so like, go forth and remix, bestie π
and that's the whole page!! this was perl v5.42.3 energy, dated 2026-09-20, and you can find her filed under Dancer2::Logger::File(3) in the User Contributed Perl Documentation. mwah, go log something gorgeous π¦π
π¦ where this page comes from
- fedora 44: perl-Dancer2 2.2.1-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms