module

FakeJournalData

Constants

Log = ::Log.for(self)
SAMPLE_CONTAINER_NAMES = ["webapp_prod_1", "api_gateway_alpha", "worker_beta_3", nil]

A list of sample container names.

SAMPLE_HOSTNAMES = ["server-alpha", "server-beta", "server-gamma"]

A list of sample hostnames.

SAMPLE_UNIT_NAMES = ["sshd.service", "nginx.service", "systemd-journald.service", "cron.service", "myapp.service", "postgresql.service", "redis-server.service", "docker.service", nil]

A list of sample unit names for generating fake data.

Class methods

fake_run_journalctl_and_parse(journalctl_args : Array(String), _log_context_message : String) : Array(Journalctl::LogEntry)

Mimics the behavior of Journalctl.run_journalctl_and_parse by returning a fake list of log entries.

Args: _journalctl_args: Unused in this fake implementation. _log_context_message: Unused in this fake implementation.

Returns: An Array of Journalctl::LogEntry, filtered and sized according to parsed args.

Source
parse_time_option(time_str : String, relative_to : Time = Time.utc) : Time | Nil
Source