On 03/03/2016 03:47 AM, Carlos E. R. wrote:
On 2016-03-03 04:27, Billy.Zheng (zw963) wrote:
No, sorry, I have very poor knowledge about how system log is worked. What i need is just a simple way to add application log to one file.
My VPS use openSUSE 42.1, I deploy some application in it, with some self-defined boot start bash scripts, I want a simple way to write all application log to same file.
If you want to write to a single file, just write yourself to it.
echo "some text" >> somefile
Yes, but don't make "somefile" /var/log/messages. Doing so will probably corrupt the proper message stream.
start_some_application |logger
Not the way to use it, IMHO.
Agreed. For example, "ssh -vvv" produced more information. But that's about a single user trying to connect, it is NOT a system activity, thus ssh -vvv 2>~/ssh.log makes more sense in this context than using syslog.
I hope it logger output to one file which I familiar and commonly. the only I know from slackware is /var/log/messages.
This is not slackware. This is not the 20th century.
so, I don't know if some *service* is depend on /var/log/message.
No, nothing should depend on /var/log/message
I'd emphasise the 'should". There are probably many archaic programs that have not been dragged kicking and screaming into The Century of the Fruitbat, sorry, the 21st century, and still work by doing what amounts to "tail -f /var/log/messages" as did that old steadfast "swatch". http://linux.die.net/man/1/swatch But then swatch could be pointed at any file, including ~/ssh.log or included in a pipeline. So "journalctl -f | swatch" would work. I should note that the tool has been renamed to 'swatchdog' so as not to offend a Swiss watch company. it does not seem to have been updated to deal with journald directly. That being said, the kind of people who would have used 'swatch' in days of old probably now use the "Simple event correlator", https://sourceforge.net/projects/simple-evcorr http://simple-evcorr.github.io/ or similar. As it stands, journalctl is quite flexible. https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-vi... and http://0pointer.de/blog/projects/journalctl.html Which gets back to the question Why are you logging? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org