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
|
pipeline.shutdown
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Stud::trap("HUP") do
|
||||||
|
@logger.info(I18n.t("logstash.agent.sighup"))
|
||||||
|
configure_logging(log_file)
|
||||||
|
end
|
||||||
|
|
||||||
# TODO(sissel): Get pipeline completion status.
|
# TODO(sissel): Get pipeline completion status.
|
||||||
pipeline.run
|
pipeline.run
|
||||||
return 0
|
return 0
|
||||||
|
@ -201,7 +206,8 @@ class LogStash::Agent < Clamp::Command
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Sending all output to #{path}."
|
puts "Sending all output to #{path}."
|
||||||
@logger.subscribe(file)
|
@logger.unsubscribe(@logger_subscription) if @logger_subscription
|
||||||
|
@logger_subscription = @logger.subscribe(file)
|
||||||
else
|
else
|
||||||
@logger.subscribe(STDOUT)
|
@logger.subscribe(STDOUT)
|
||||||
end
|
end
|
||||||
|
|
|
@ -50,6 +50,8 @@ en:
|
||||||
For more information on plugin statuses, see
|
For more information on plugin statuses, see
|
||||||
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
|
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
|
||||||
agent:
|
agent:
|
||||||
|
sighup: >-
|
||||||
|
SIGHUP received.
|
||||||
missing-configuration: >-
|
missing-configuration: >-
|
||||||
No configuration file was specified. Perhaps you forgot to provide
|
No configuration file was specified. Perhaps you forgot to provide
|
||||||
the '-f yourlogstash.conf' flag?
|
the '-f yourlogstash.conf' flag?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue