lib/timber/log_entry.rb in timber-2.0.9 vs lib/timber/log_entry.rb in timber-2.0.10

- old
+ new

@@ -1,5 +1,7 @@ +require 'socket' + module Timber # Represents a new log entry into the log. This is an intermediary class between # `Logger` and the log device that you set it up with. class LogEntry #:nodoc: DT_PRECISION = 6.freeze @@ -24,10 +26,12 @@ @message = message @tags = options[:tags] @time_ms = options[:time_ms] context_snapshot = {} if context_snapshot.nil? - system_context = Contexts::System.new(pid: Process.pid) + hostname = Socket.gethostname + pid = Process.pid + system_context = Contexts::System.new(hostname: hostname, pid: pid) context_snapshot[system_context.keyspace] = system_context.as_json @context_snapshot = context_snapshot @event = event end \ No newline at end of file