syslog question
I am looking into syslog.
I understand that it is a centralized logging facility that collects logs from various sources. I have heard that syslog can generate alerts on conditions e.g. max file size of log file is reached. Is this true? Because I haven't found 开发者_StackOverflow社区how this is done. Most posts just refer to the logging. How is the event generation done? I.e. if I have an app that acts as a log source (redirects logging to a syslog) then is it possible my app can receive an alert, if the max file size has been reached? How is this configured?Thank you!
From the application perspective, the syslog function is primarily a receiver of information from the application; the application can write messages to the syslog. There are various bits of information that the application provides to the syslog daemon, including the severity of the message.
The syslog daemon can be configured to take different actions on receipt of different types of message.
No, your application cannot receive an alert when the maximum file size is reached - at least, not via syslog. You might get a SIGXFSZ signal which you can trap. You might prefer to look at your resource limits and keep tabs on your file size to avoid the problem.
精彩评论