-
-
06 Jun 2021 17:32:08 UTC
- Distribution: Dancer2
- Module version: 0.301004
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (1111 / 3 / 0)
- Kwalitee
Bus factor: 3- 84.81% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (391.12KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Dancer Core Developers
- Dependencies
- Attribute::Handlers
- CLI::Osprey
- Carp
- Clone
- Config::Any
- Digest::SHA
- Encode
- Exporter
- Exporter::Tiny
- File::Basename
- File::Copy
- File::Path
- File::Share
- File::Spec
- File::Temp
- File::Which
- HTTP::Date
- HTTP::Headers::Fast
- HTTP::Tiny
- Hash::Merge::Simple
- Hash::MultiValue
- Import::Into
- JSON::MaybeXS
- List::Util
- MIME::Base64
- Module::Runtime
- Moo
- Moo::Role
- POSIX
- Path::Tiny
- Plack
- Plack::Middleware::FixMissingBodyInRedirect
- Plack::Middleware::RemoveRedundantBody
- Ref::Util
- Role::Tiny
- Safe::Isa
- Sub::Quote
- Template
- Template::Tiny
- Test::Builder
- Test::More
- Type::Tiny
- Types::Standard
- URI::Escape
- YAML
- parent
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Dancer2::Logger::File - file-based logging engine for Dancer2
VERSION
version 0.301004
DESCRIPTION
This is a logging engine that allows you to save your logs to files on disk.
Logs are not automatically rotated. Use a log rotation tool like
logrotate
incopytruncate
mode.METHODS
log($level, $message)
Writes the log message to the file.
CONFIGURATION
The setting
logger
should be set toFile
in order to use this logging engine in a Dancer2 application.The follow attributes are supported:
log_dir
Directory path to hold log files.
Defaults to logs in the application directory
file_name
The name of the log file.
Defaults to the environment name with a .log suffix
Here is an example configuration that use this logger and stores logs in /var/log/myapp:
logger: "File" engines: logger: File: log_dir: "/var/log/myapp" file_name: "myapp.log"
AUTHOR
Dancer Core Developers
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 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.
Module Install Instructions
To install Dancer2, copy and paste the appropriate command in to your terminal.
cpanm Dancer2
perl -MCPAN -e shell install Dancer2
For more information on module installation, please visit the detailed CPAN module installation guide.