Class: Locd::Agent::RotateLogs
- Inherits:
-
Job
- Object
- Locd::Agent
- Job
- Locd::Agent::RotateLogs
- Includes:
- System
- Defined in:
- lib/locd/agent/rotate_logs.rb
Overview
An server Locd::Agent (HTTP only at the moment) that the proxy can route requests to.
Constant Summary
Constants inherited from Locd::Agent
Instance Attribute Summary
Attributes inherited from Locd::Agent
Class Method Summary collapse
-
.default_cmd_template ⇒ String
Not much to explain here.
- .default_start_interval ⇒ Object
-
.default_write_kwds(cmd_template: self.default_cmd_template, start_interval: self.default_start_interval, **kwds) ⇒ Object
Patch in RotateLogs.default_cmd_template as, well, the default for
cmd_template
. -
.label_name ⇒ String
The non-namespace part of the log rotator agent's label.
Methods included from System
class_for, classes, included, label?, plist?
Methods inherited from Job
Methods inherited from Locd::Agent
#<=>, add, add_or_update, all, class_for, #cmd_template, #config, create_plist_data, default_log_path, #default_log_path?, #err_path, exists?, find_all, find_all!, find_only!, from_path, get, #initialize, #label, labels, #last_exit_code, #load, #log_paths, #out_path, #pid, plist?, plist_abs_path, plists, #reload, #remove, render_cmd, resolve_log_path, #restart, #running?, #start, #status, #stop, #stopped?, #to_h, #to_json, #to_yaml, #unload, #update, user_plist_abs_dir, #workdir
Constructor Details
This class inherits a constructor from Locd::Agent
Class Method Details
.default_cmd_template ⇒ String
Not much to explain here.
55 56 57 |
# File 'lib/locd/agent/rotate_logs.rb', line 55 def self.default_cmd_template "{bin} rotate-logs run" end |
.default_start_interval ⇒ Object
60 61 62 |
# File 'lib/locd/agent/rotate_logs.rb', line 60 def self.default_start_interval NRSER.deep_symbolize_keys Locd.config[:rotate_logs, :start_interval] end |
.default_write_kwds(cmd_template: self.default_cmd_template, start_interval: self.default_start_interval, **kwds) ⇒ Object
Patch in default_cmd_template as, well, the default for cmd_template
.
73 74 75 76 77 78 79 80 |
# File 'lib/locd/agent/rotate_logs.rb', line 73 def self.default_write_kwds cmd_template: self.default_cmd_template, start_interval: self.default_start_interval, **kwds super \ cmd_template: cmd_template, start_interval: start_interval, **kwds end |
.label_name ⇒ String
Returns The non-namespace part of the log rotator agent's label.
46 47 48 |
# File 'lib/locd/agent/rotate_logs.rb', line 46 def self.label_name "rotate_logs" end |