Cross Reference:
xref
: /
ontohub
/
git
/
lib
/
ontohub_logger.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontohub_logger.rb revision c3a6c336056933aaedbf12520434a95a9ce1ea5c
require
'logger'
def
convert_log_level
log_level
Logger.const
_get
(
log_level.upcase
)
rescue
NameError
$stderr
.
puts
"WARNING: Unrecognized log level #{
log_level.inspect
}."
$stderr
.
puts
"WARNING: Falling back to INFO."
Logger
::
INFO
end
config
=
OntohubConfig.instance
$logger
=
Logger.new
(
config.log
_file
)
$logger
.
level
=
convert_log_level
(
config.log
_level
)