Skip to content

Commit

Permalink
Close logger after app exits (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz committed Jul 10, 2023
1 parent 92d3e43 commit bc16761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/logtail/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def initialize(*io_devices_and_loggers)
Logtail::Config.instance.debug { "Logtail::Logger instantiated, level: #{level}, formatter: #{formatter.class}" }

@initialized = true

at_exit { self.close }
end

# Sets a new formatted on the logger.
Expand Down
2 changes: 1 addition & 1 deletion lib/logtail/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Logtail
VERSION = "0.1.8"
VERSION = "0.1.9"
end

0 comments on commit bc16761

Please sign in to comment.