class

Meridian::Audit::Logger

Inherits Reference < Object

Appends and reads concise, line-oriented audit entries on remote hosts. Auditing is best-effort: a failed write never aborts the operation it records. SSH and time dependencies are injectable for specs.

Constructors

new(config : Config::DeployConfig, ssh_executor : SSH::Executor = SSH::Executor.new, clock : Proc(Time) = -> do Time.utc end, actor : Proc(String) = -> do Audit.default_actor end)
Source

Instance methods

recent(host : String, limit : Int32) : Array(Entry)

Read the most recent audit entries from a host, newest last.

Source
record(host : String, action : String, detail : String) : Nil

Append one audit entry to a single host's audit log.

Source
record_all(hosts : Enumerable(String), action : String, detail : String) : Nil

Append the same audit entry to several hosts.

Source