mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Add more clear message about logging and awesome_print
This commit is contained in:
parent
cb27d5939b
commit
3852f653a7
1 changed files with 8 additions and 5 deletions
|
@ -22,15 +22,18 @@ class LogStash::Logger < Logger
|
|||
self.level = Logger::DEBUG
|
||||
end
|
||||
|
||||
@formatter.progname = self.progname = File.basename($0)
|
||||
|
||||
# Conditional support for awesome_print
|
||||
if !@@have_awesome_print && @@notify_awesome_print_load_failed
|
||||
info [ "Failed: require 'ap' (aka awesome_print); some " \
|
||||
"logging features may be disabled",
|
||||
@@notify_awesome_print_load_failed ]
|
||||
debug [ "awesome_print not found, falling back to Object#inspect." \
|
||||
"If you want prettier log output, run 'gem install "\
|
||||
"awesome_print'",
|
||||
{ :exception @@notify_awesome_print_load_failed }]
|
||||
|
||||
# Only show this once.
|
||||
@@notify_awesome_print_load_failed = nil
|
||||
end
|
||||
|
||||
@formatter.progname = self.progname = File.basename($0)
|
||||
end # def initialize
|
||||
|
||||
def level=(level)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue