Journalctl::LogEntry
Inherits JSON::Serializable < Reference < Object
Represents a single log entry retrieved from journalctl.
This class is used to parse and serialize log data.
It includes JSON::Serializable to allow easy conversion to and from JSON.
Constructors
Constructor used by JSON::Serializable. It's called with named arguments matching property names, after converters are applied.
Class methods
Instance methods
Will hold all raw data from journalctl as string key-value pairs
Converts the raw timestamp string to a formatted date/time string. Example format: "2023-10-27 15:04:05.123"
Converts the timestamp to a formatted string using the configured timezone
Getter for the priority string (e.g., "0" to "7")
This maintains compatibility with previous direct priority field access.
The __REALTIME_TIMESTAMP from journalctl is microseconds since epoch, as a string.
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.