Module: TrackerHub::Request::Config::Logger
- Defined in:
- lib/tracker_hub/request/config/logger.rb
Overview
Default customizable configurations for normal/rolling logger
Constant Summary collapse
- ROLLING_PATTERN =
'%Y-%m-%d-%H-%M-%S'.freeze
- ROLLING_AGE =
'daily'.freeze
- ROLLING_SIZE =
1.gigabyte.freeze
- LOGGER_NAME =
'requests'.freeze
- LOGFILE_NAME =
"#{LOGGER_NAME}.log".freeze
Class Method Summary collapse
-
.default_config ⇒ ActiveSupport::Logger
Default configuration for the logger.
-
.rolling_logger(args = {}) ⇒ Logging::Logger
Template for the rolling logger configuration Note: for additional options, please refer to: www.rubydoc.info/gems/logging/Logging/Appenders/RollingFile:initialize.
Class Method Details
.default_config ⇒ ActiveSupport::Logger
Default configuration for the logger
48 49 50 |
# File 'lib/tracker_hub/request/config/logger.rb', line 48 def default_config ::ActiveSupport::Logger.new(File.join(log_path, LOGFILE_NAME)) end |
.rolling_logger(args = {}) ⇒ Logging::Logger
Template for the rolling logger configuration
Note: for additional options, please refer to:
http://www.rubydoc.info/gems/logging/Logging/Appenders/RollingFile:initialize
33 34 35 36 37 |
# File 'lib/tracker_hub/request/config/logger.rb', line 33 def rolling_logger(args = {}) = (args) build_rolling_logger() end |