Class: Pvectl::Commands::Logs::Handlers::Syslog
- Inherits:
-
Object
- Object
- Pvectl::Commands::Logs::Handlers::Syslog
- Includes:
- ResourceHandler
- Defined in:
- lib/pvectl/commands/logs/handlers/syslog.rb
Overview
Handler for node syslog output.
Fetches syslog entries from a node via Repositories::Syslog. Supports filtering by service name and time range.
Instance Method Summary collapse
-
#initialize(repository: nil) ⇒ Syslog
constructor
A new instance of Syslog.
- #list(node:, limit: 50, since: nil, until_time: nil, service: nil, **_) ⇒ Object
- #presenter ⇒ Object
Constructor Details
#initialize(repository: nil) ⇒ Syslog
Returns a new instance of Syslog.
22 23 24 |
# File 'lib/pvectl/commands/logs/handlers/syslog.rb', line 22 def initialize(repository: nil) @repository = repository end |
Instance Method Details
#list(node:, limit: 50, since: nil, until_time: nil, service: nil, **_) ⇒ Object
26 27 28 29 |
# File 'lib/pvectl/commands/logs/handlers/syslog.rb', line 26 def list(node:, limit: 50, since: nil, until_time: nil, service: nil, **_) repository.list(node: node, limit: limit, since: since, until_time: until_time, service: service) end |
#presenter ⇒ Object
31 32 33 |
# File 'lib/pvectl/commands/logs/handlers/syslog.rb', line 31 def presenter Presenters::SyslogEntry.new end |