Browse files

Redefine log levels on #reset

When #define_log_levels was called from the test suite, it redefined the
global log levels without being able to roll back to the original state.
This patch makes #reset redefine the original log levels.

Change-Id: I3975df6e1d9b299836571aac9532a7e2f9d1a009
  • Loading branch information...
1 parent 5027d2d commit d5e2a8dfdb046b0d8ac1df95dd5810718e9b23a2 @pietern pietern committed Nov 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 vcap_logging/lib/vcap/logging.rb
2 vcap_logging/lib/vcap/logging.rb
@@ -38,7 +38,6 @@ class << self
def init
fail "init() can only be called once" if @initialized
- VCAP::Logging::Logger.define_log_levels(LOG_LEVELS)
# Ideally we would call close() on each sink. Unfortunatley, we can't be sure
@@ -53,6 +52,7 @@ def init
# Exists primarily for testing
def reset
+ VCAP::Logging::Logger.define_log_levels(LOG_LEVELS)
@default_log_level = pick_default_level(LOG_LEVELS)
@sink_map =
@log_level_filters = {}

0 comments on commit d5e2a8d

Please sign in to comment.