Sha256: d16cc1d70f696b3865c7d41ae048c7ab73249abe3ffaed46c9a87ed73266b133

Contents?: true

Size: 419 Bytes

Versions: 10

Compression:

Stored size: 419 Bytes

Contents

# -*- ruby -*-
#encoding: utf-8

require 'arborist'


Arborist::Observer "Audit Logger" do
	subscribe to: 'node.update', on: 'localhost'
	action do |event|
		$stderr.puts "%p" % [ event ]
	end
	summarize( every: 8 ) do |events|
		$stderr.puts "Audit summary:"
		events.each do |time, ev|
			$stderr.puts "  [%s] %s: %p" % [
				time.strftime('%Y-%m-%d %H:%M:%S %z'),
				ev['type'],
				ev['data']
			]
		end
	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arborist-0.6.0 spec/data/observers/auditor.rb
arborist-0.5.0 spec/data/observers/auditor.rb
arborist-0.4.0 spec/data/observers/auditor.rb
arborist-0.3.0 spec/data/observers/auditor.rb
arborist-0.2.0 spec/data/observers/auditor.rb
arborist-0.2.0.pre20170519125456 spec/data/observers/auditor.rb
arborist-0.1.0 spec/data/observers/auditor.rb
arborist-0.0.1.pre20161005182540 spec/data/observers/auditor.rb
arborist-0.0.1.pre20161005112841 spec/data/observers/auditor.rb
arborist-0.0.1.pre20160829140603 spec/data/observers/auditor.rb