Module: Yologga
- Defined in:
- lib/yologga.rb,
lib/yologga/version.rb,
lib/yologga/patch/ruby_2_3.rb,
lib/yologga/patch/ruby_2_4.rb,
lib/yologga/patch/ruby_2_5.rb
Defined Under Namespace
Modules: Patch Classes: Gzip, LogsLifetime
Constant Summary collapse
- VERSION =
"0.3.3"
Class Attribute Summary collapse
-
.gzip ⇒ Object
Returns the value of attribute gzip.
-
.logs_lifetime ⇒ Object
Returns the value of attribute logs_lifetime.
Class Method Summary collapse
Class Attribute Details
.gzip ⇒ Object
Returns the value of attribute gzip.
13 14 15 |
# File 'lib/yologga.rb', line 13 def gzip @gzip end |
.logs_lifetime ⇒ Object
Returns the value of attribute logs_lifetime.
13 14 15 |
# File 'lib/yologga.rb', line 13 def logs_lifetime @logs_lifetime end |
Class Method Details
.add_hourly_rotation_period_support! ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/yologga.rb', line 15 def add_hourly_rotation_period_support! if hourly_mixin Logger::LogDevice.prepend(hourly_mixin) else warn unsupported_warning end end |
.default_rotation_period=(period) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/yologga.rb', line 23 def default_rotation_period=(period) raise unsupported_warning if period == "hourly" && !hourly_mixin mixin = Module.new do define_method(:initialize) do |logdev, shift_age = period, *args| super(logdev, shift_age, *args) end end Logger.prepend(mixin) end |