Parent

Class/Module Index [+]

Quicksearch

Backup::Logger::Logfile::Options

Attributes

enabled[R]

Enable the use of Backup’s log file.

While not necessary, as this is true by default, this may also be set on the command line using --logfile.

The use of Backup’s log file may be disabled using the command line option --no-logfile.

If --no--logfile is used on the command line, then the log file will be disabled and any setting here will be ignored.

@param [Boolean, nil] @return [Boolean, nil] Default: true

log_path[R]

Path to directory where Backup’s logfile will be written.

This may be given as an absolute path, or a path relative to Backup’s --root-path (which defaults to +~/Backup+).

This may also be set on the command line using --log-path. If set on the command line, any setting here will be ignored.

@param [String] @return [String] Default: ‘log’

max_bytes[RW]

Size in bytes to truncate logfile to before backup jobs are run.

This is done once before all triggers, so the maximum logfile size would be this value plus whatever the jobs produce.

@param [Integer] @return [Integer] Default: 500_000

Public Class Methods

new() click to toggle source
# File lib/backup/logger/logfile.rb, line 47
def initialize
  @enabled = true
  @log_path = ''
  @max_bytes = 500_000
end

Public Instance Methods

enabled=(val) click to toggle source
# File lib/backup/logger/logfile.rb, line 57
def enabled=(val)
  @enabled = val unless enabled.nil?
end
enabled?() click to toggle source
# File lib/backup/logger/logfile.rb, line 53
def enabled?
  !!enabled
end
log_path=(val) click to toggle source
# File lib/backup/logger/logfile.rb, line 61
def log_path=(val)
  @log_path = val.to_s.strip if log_path.empty?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.