How can we add a custom log file to stdout. For example, can we add all the logs in /var/log folder . If possible, how can we achieve that?
This doesn't seem to be an Elasticsearch question, what product are you referring to?
Are you trying to output to a file in logstash?
output {
file {
path => "/var/log/filename.log"
}
}
I am not refering to logstash. my doubt was Can I add custom log files to stdout for elasticsearch. Suppose I have some logs in var/log / path. Can I send those logs to stdout.
You want Elasticsearch's logs to go to stdout?
Elasticsearch logs going to stdout by default. But can we add any custom log files that are there in the var/log to stdout.
Is there a reason for wanting this?
Yes. We want this requirement
I don't know what that means sorry.
Do they need to go anywhere other than stdout?
Suppose we have var/log/ex.log, that log file will go to stdout. Is that possible ? Can you tell this please?
Elasticsearch doesn't log it's own log output to stdout unless you run it as a foreground process.
If you are talking about taking the logs that are being sent to Elasticsearch and also logging them to stdout, that is outside the scope of what Elasticsearch does.
If you are referring to something else, then perhaps you can explain it with an extended example, as it's not really clear what you are looking for and asking.
Right.
This is not something that Elasticsearch can do. Filebeat can via this method - https://www.elastic.co/guide/en/beats/filebeat/current/console-output.html
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.