Xen writes:
Billy.Zheng(zw963) schreef op 09-04-16 08:30:
You do know squid outputs to its own logfile right? Normally it would output to /var/log/squid.
Yes.
You get to specify those directories when you compile.
I think they are ./configure options.
Yes.
It is a improper example here.
but, some package, e.g. shadowsocks (one socks5 proxy), it just output log to stdout, when run in background, i need add log myself.
I think:
- edit /etc/logrotate.conf OR create custom logrotate.conf
- in latter case add custom user crontab for it
- add a line and file to a custom /etc/rsyslog.d/ file, in other words based on /etc/rsyslog.d/50-default.conf (on my system), add a facility.priority pair (such as user.info)
This is the list of facilities:
auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp and local0 through local7
This is the list of priorities:
debug, info, notice, warning, err, crit, alert, emerg
now feed the output of your program to "logger -p facility.priority".
or possibly "logger -p facility.priority -t tag"
Now the regular syslog daemon (rsyslog) should output the log of that specific program to that specific file associated with that specific facility.priority pair.
This what you guys mean right.
Thank you Carlos?
Cool. Though, complex a little for a ruby programmer => me. ;) I will try it later. Thanks. -- Geek, Rubyist, Emacser 程序员中的牛逼运维, 运维中的牛逼程序员。 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org