Remove log4j setup.
This commit is contained in:
parent
b3a6de6340
commit
d2f99b05d2
|
@ -98,7 +98,6 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
||||||
def register
|
def register
|
||||||
@logger.info('JDBC - Starting up')
|
@logger.info('JDBC - Starting up')
|
||||||
|
|
||||||
LogStash::Logger.setup_log4j(@logger)
|
|
||||||
load_jar_files!
|
load_jar_files!
|
||||||
|
|
||||||
@stopping = Concurrent::AtomicBoolean.new(false)
|
@stopping = Concurrent::AtomicBoolean.new(false)
|
||||||
|
@ -152,7 +151,7 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
||||||
# Test connection
|
# Test connection
|
||||||
test_connection = @pool.getConnection
|
test_connection = @pool.getConnection
|
||||||
unless test_connection.isValid(validate_connection_timeout)
|
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
|
end
|
||||||
test_connection.close
|
test_connection.close
|
||||||
end
|
end
|
||||||
|
@ -173,13 +172,13 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
||||||
File.join(File.dirname(__FILE__), '../../../vendor/jar/jdbc/*.jar')
|
File.join(File.dirname(__FILE__), '../../../vendor/jar/jdbc/*.jar')
|
||||||
end
|
end
|
||||||
|
|
||||||
@logger.debug('JDBC - jarpath', path: jarpath)
|
@logger.trace('JDBC - jarpath', path: jarpath)
|
||||||
|
|
||||||
jars = Dir[jarpath]
|
jars = Dir[jarpath]
|
||||||
raise LogStash::ConfigurationError, 'JDBC - No jars found. Have you read the README?' if jars.empty?
|
raise LogStash::ConfigurationError, 'JDBC - No jars found. Have you read the README?' if jars.empty?
|
||||||
|
|
||||||
jars.each do |jar|
|
jars.each do |jar|
|
||||||
@logger.debug('JDBC - Loaded jar', jar: jar)
|
@logger.trace('JDBC - Loaded jar', jar: jar)
|
||||||
require jar
|
require jar
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user