franz 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/franz +3 -0
  4. data/lib/franz/logger.rb +10 -4
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 002cdbcf468f836461f433dcac17b46bae72d6d4
4
- data.tar.gz: 6d8ff2477e002e1430ea7e5f6123ac0bad96ef27
3
+ metadata.gz: 55da641aa1d850bea403f1fa8d16284d4c9e0744
4
+ data.tar.gz: de8c946eb160ef42df9db22a446757cc7932d011
5
5
  SHA512:
6
- metadata.gz: 9df6ecca70bdc52d7b6d5e307612a911ded05ecc925a3771be33eff5f9fe4ac6820bcf2550e97c2b4f876ff4219f09f5222174034be7fa197fd4a7c63b2ecd7a
7
- data.tar.gz: 067961fe1616a5244781b4ddc248cbcc4a549ea2f183485b79aae6831684b927a27f724f05afb089b3bb977a6bf2975e9e9d65d040a545be88f764bd3ab46196
6
+ metadata.gz: 2ed1d31db5af9431789c77ec990d3d12513906124879375645a146c73be7dce6f79c49390d805901bd341bfdef7a7951fa2b03a8de2e704f49822aa653cf2c13
7
+ data.tar.gz: 7651fc05d96b7a831b9c526895ec7692bf48f52f4eb09e5d00f5672fec252f1a00cc33054341ce5d52372c6d9c9ee7dc735a384dcca58e711a6b1083df18560f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.5
1
+ 1.5.6
data/bin/franz CHANGED
@@ -48,6 +48,9 @@ io_bound = config[:output][:bound] || 10_000
48
48
  io = Queue.new
49
49
  io = SizedQueue.new io_bound if io_bound > 0
50
50
 
51
+ logger.info \
52
+ event: 'boot',
53
+ version: Franz::VERSION
51
54
 
52
55
  # Now we'll connect to our output, RabbitMQ. This creates a new thread in the
53
56
  # background, which will consume the events generated by our input on io
data/lib/franz/logger.rb CHANGED
@@ -1,9 +1,12 @@
1
+ require 'socket'
1
2
  require 'logger'
2
3
  require 'time'
3
4
 
4
5
  require 'colorize'
5
6
 
7
+
6
8
  module Franz
9
+ HOSTNAME = Socket.gethostname
7
10
 
8
11
  # Extending the Logger with TRACE capabilities
9
12
  class ::Logger
@@ -45,14 +48,17 @@ module Franz
45
48
  private
46
49
  def format colorize
47
50
  self.formatter = proc do |severity, datetime, _, message|
51
+ severity.downcase!
48
52
 
49
53
  message = { message: message } unless message.is_a? Hash
50
54
 
51
55
  event = {
52
- severity: severity.downcase!,
53
- timestamp: datetime.iso8601(6),
54
- marker: File::basename(caller[4])
55
- }.merge(message)
56
+ type: :franz,
57
+ level: severity,
58
+ '@timestamp' => datetime.iso8601(3),
59
+ marker: File::basename(caller[4]),
60
+ host: HOSTNAME
61
+ }.merge message
56
62
 
57
63
  if colorize # console output
58
64
  event = JSON::pretty_generate(event) + "\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: franz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer