Most desktop users have little use for the logs under normal conditions,
I use linux four years, I almost not write any log. in fact, in my opinion, a programmer which can read linux log is a better programmer. (not every coder have a habit to read log) in fact, my server exist some little program which only output log to STDOUT, no daemon mode built-in, I start up those service from crontab with @reboot keywoard is worked well for me, but I could not read log anymore, so i want to log with some CORRECT way. auto rotated support, convenience for view. this application is a proxy like package, I want to find out accessed ip if i need, this not a big or frequently logger, bit it useful, i just want to try standardize this process, and find out the correct way to do this. Thanks. Anton Aylward writes:
On 03/02/2016 10:27 PM, Billy.Zheng (zw963) wrote:
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.
start_some_application |logger
I hope it logger output to one file which I familiar and commonly. the only I know from slackware is /var/log/messages.
so, I don't know if some *service* is depend on /var/log/message.
In
Date: Wed, 02 Mar 2016 02:26:52 +0800 Message-ID: <87h9gq6olv.fsf@163.com>
You said
And, some service is not start correctly cause this file missing?
So long as the application/service/daemon/whatever uses the syslog protocols there should not be a problem. Why would a program want to write directly to /var/log/<anything>?
After all. you make calls to the system to write rather than writing directly to the disk and trying to replicate the file system drivers inside applications.
I think your problem here has to do with this:
Why are you logging activity?
Most desktop users have little use for the logs under normal conditions, they are there for when things go wrong or as a record of "when did I do that?". When things go wrong its different and logging is turned right up and the logs are viewed in real-time. Think, for example, of "ssh -vvvvv". The real-time viewing of that can be done with filtering ("artificial ignorance" of other items) using journalctl.
Its different for a large installation,a bank, brokerage, ISP, where either activity needs to be recorded and retailed (... for six months ... for 7 years ...) or where the real time activity of illegal intrusion or ex-filtration needs to be spotted and responded to. But once again, the high level tools, possibly even ones that come from 3rd parties, are there and there is no need for low level file activity.
I can imagine other types of logging. I keep a hand written book that regular readers will record me mentioning, in which I record my 'experiment's and trials' and the reasons for the decisions I made and my thoughts about the results. My recent posing about creating an encrypted LVM LV is an example of that. Why hand written and not on-line? It needs to be accessible when I'm off-line, for example when carrying out an installation.
So, what is the purpose of the logging that you are wrestling with here?
-- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon?
-- Geek, Rubyist, Emacser 程序员中的牛逼运维, 运维中的牛逼程序员。 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org