Billy.Zheng(zw963) wrote:
basically, the reason is, e.g. squid, though some like improper. because squid have own log builtin support when compile.
1. I want to use the last version squid in my VPS. so, i have to compile it myself.
2. I need a common startup script for squid to start. simply enough, I add one line in my crontab '@reboot /usr/local/bin/start_squid' `start_squid' is a bash script for start squid correctly.
3. i want to record log to file, for some net analysis. I am not a linux administrator, less experience for logger, i hope spend minimum cost to achieve a sysetm logger like service. function included following: - rotately automatically. - can be output real time if need.
Is the openSUSE supplied squid really too old for your purposes? It seems it would be a lot less work to use that.
I often read log when in programming development, so i think log is useful in this case.
The problem is:
1. What is the correct way to add my startup script log into journalctl or something else?
You create a systemd service unit, maybe "mysquid.service". See man systemd.service for details and look at some existing ones for inspiration. Or install squid from the openSUSE repo, and just update the service unit to fit your squid binary.
2. if use `ssh -vvv 2>~/ssh.log' way, should i must to add rotately function myself ? is there exist convenient way for this?
AFAIK, as long as ssh is running, ~/ssh.log will be kept open. If you rotate that file, ssh will need to be restarted.
-- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon?
As Anton hinted above, please don't top-post, it's a bad habit. -- Per Jessen, Zürich (6.6°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org