spec/support/logging.rb in zk-1.5.0 vs spec/support/logging.rb in zk-1.5.1

- old
+ new

@@ -7,10 +7,13 @@ :date_pattern => '%Y-%m-%d %H:%M:%S.%6N' ) appender = ENV['ZK_DEBUG'] ? Logging.appenders.stderr : Logging.appenders.file(ZK::TEST_LOG_PATH) appender.layout = layout +#appender.immediate_at = "debug,info,warn,error,fatal" +appender.auto_flushing = 25 +appender.flush_period = 5 %w[ZK ClientForker spec Zookeeper].each do |name| ::Logging.logger[name].tap do |log| log.appenders = [appender] log.level = :debug @@ -19,10 +22,12 @@ # this logger is kinda noisy Logging.logger['ZK::EventHandler'].level = :info Zookeeper.logger = Logging.logger['Zookeeper'] -Zookeeper.logger.level = :info +Zookeeper.logger.level = ENV['ZOOKEEPER_DEBUG'] ? :debug : :warn + +ZK::ForkHook.after_fork_in_child { ::Logging.reopen } # Zookeeper.logger = ZK.logger.clone_new_log(:progname => 'zoo') # Zookeeper.logger = ZK.logger # Zookeeper.set_debug_level(4)