Class: VidazingLogger::Appenders::Log Private

Inherits:
Basic
  • Object
show all
Defined in:
lib/vidazing_logger/appenders/log.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Appender writing to log files

Since:

  • 0.1.0

Direct Known Subclasses

BuildLog, ErrorLog

Instance Attribute Summary collapse

Attributes inherited from Basic

#appender

Instance Method Summary collapse

Constructor Details

#initialize(log_dir:, name:) ⇒ Log

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Log

Since:

  • 0.1.0



19
20
21
22
23
24
25
26
# File 'lib/vidazing_logger/appenders/log.rb', line 19

def initialize(log_dir:, name:)
  @log_dir = log_dir
  @name = "#{name}.log"

  appender_type = Appenders::Type::ID_ROLLING_FILE
  appender_id = log_path
  super(type: appender_type, id: appender_id)
end

Instance Attribute Details

#log_dirObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



13
14
15
# File 'lib/vidazing_logger/appenders/log.rb', line 13

def log_dir
  @log_dir
end

Instance Method Details

#log_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



15
16
17
# File 'lib/vidazing_logger/appenders/log.rb', line 15

def log_path
  "#{@log_dir}/#{@name}"
end