Method: Arrow::Logger.parse_log_setting

Defined in:
lib/arrow/logger.rb

.parse_log_setting(setting) ⇒ Object

Parse the configuration for a given class’s logger. The configuration is in the form:

<level> [<outputter_uri>]

where level is one of the logging levels defined by this class (see the LEVELS constant), and the optional outputter_uri indicates which outputter to use, and how it should be configured. See Arrow::Logger::Outputter for more info.

Examples:

notice
debug file:///tmp/broker-debug.log
error dbi://www:password@localhost/www.errorlog?driver=postgresql


141
142
143
144
145
146
# File 'lib/arrow/logger.rb', line 141

def self::parse_log_setting( setting )
	level, rawuri = setting.split( ' ', 2 )
	uri = rawuri.nil? ? nil : URI.parse( rawuri )

	return level.to_sym, uri
end