mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- make SIGHUP configure logging again (causes the logfile to be
reopened)
This commit is contained in:
parent
ffcd656498
commit
5cbc1aa221
2 changed files with 9 additions and 1 deletions
|
@ -96,6 +96,11 @@ class LogStash::Agent < Clamp::Command
|
|||
pipeline.shutdown
|
||||
end
|
||||
|
||||
Stud::trap("HUP") do
|
||||
@logger.info(I18n.t("logstash.agent.sighup"))
|
||||
configure_logging(log_file)
|
||||
end
|
||||
|
||||
# TODO(sissel): Get pipeline completion status.
|
||||
pipeline.run
|
||||
return 0
|
||||
|
@ -201,7 +206,8 @@ class LogStash::Agent < Clamp::Command
|
|||
end
|
||||
|
||||
puts "Sending all output to #{path}."
|
||||
@logger.subscribe(file)
|
||||
@logger.unsubscribe(@logger_subscription) if @logger_subscription
|
||||
@logger_subscription = @logger.subscribe(file)
|
||||
else
|
||||
@logger.subscribe(STDOUT)
|
||||
end
|
||||
|
|
|
@ -50,6 +50,8 @@ en:
|
|||
For more information on plugin statuses, see
|
||||
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
|
||||
agent:
|
||||
sighup: >-
|
||||
SIGHUP received.
|
||||
missing-configuration: >-
|
||||
No configuration file was specified. Perhaps you forgot to provide
|
||||
the '-f yourlogstash.conf' flag?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue