Class: Hatchet::Features::Logs
- Inherits:
-
Object
- Object
- Hatchet::Features::Logs
- Defined in:
- lib/hatchet/features/logs.rb
Overview
Logs client for interacting with Hatchet’s logs API
This class provides a high-level interface for listing log lines associated with task runs in the Hatchet system.
Instance Method Summary collapse
-
#initialize(rest_client, config) ⇒ void
constructor
Initializes a new Logs client instance.
-
#list(task_run_id, limit: 1000, since: nil, until_time: nil) ⇒ Object
List log lines for a given task run.
Constructor Details
#initialize(rest_client, config) ⇒ void
Initializes a new Logs client instance
23 24 25 26 27 |
# File 'lib/hatchet/features/logs.rb', line 23 def initialize(rest_client, config) @rest_client = rest_client @config = config @log_api = HatchetSdkRest::LogApi.new(rest_client) end |
Instance Method Details
#list(task_run_id, limit: 1000, since: nil, until_time: nil) ⇒ Object
List log lines for a given task run
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/hatchet/features/logs.rb', line 39 def list(task_run_id, limit: 1000, since: nil, until_time: nil) @log_api.v1_log_line_list( task_run_id, { limit: limit, since: since&.utc&.iso8601, _until: until_time&.utc&.iso8601, }, ) end |