From d2f99b05d250b607af4653d7f8f1501ac30d7520 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Fri, 2 Sep 2016 14:48:01 +0100 Subject: [PATCH] Remove log4j setup. --- lib/logstash/outputs/jdbc.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/logstash/outputs/jdbc.rb b/lib/logstash/outputs/jdbc.rb index 649fd79..fb34230 100644 --- a/lib/logstash/outputs/jdbc.rb +++ b/lib/logstash/outputs/jdbc.rb @@ -98,7 +98,6 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base def register @logger.info('JDBC - Starting up') - LogStash::Logger.setup_log4j(@logger) load_jar_files! @stopping = Concurrent::AtomicBoolean.new(false) @@ -152,7 +151,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base # Test connection test_connection = @pool.getConnection unless test_connection.isValid(validate_connection_timeout) - @logger.error('JDBC - Connection is not reporting as validate. Either connection is invalid, or driver is not getting the appropriate response.') + @logger.warn('JDBC - Connection is not reporting as validate. Either connection is invalid, or driver is not getting the appropriate response.') end test_connection.close end @@ -173,13 +172,13 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base File.join(File.dirname(__FILE__), '../../../vendor/jar/jdbc/*.jar') end - @logger.debug('JDBC - jarpath', path: jarpath) + @logger.trace('JDBC - jarpath', path: jarpath) jars = Dir[jarpath] raise LogStash::ConfigurationError, 'JDBC - No jars found. Have you read the README?' if jars.empty? jars.each do |jar| - @logger.debug('JDBC - Loaded jar', jar: jar) + @logger.trace('JDBC - Loaded jar', jar: jar) require jar end end