Separate by program name
First, refer to the original configuration
# A template to for higher precision timestamps + severity Logging
$ Template spicetmpl, "% timestamp %. % timestamp: Date-subseconds % syslogtag % syslogseverity-text %: % MSG ::: sp-if-no-1st-sp % MSG ::: drop-last-lf % \ n"
: Programname, startswith, "spice-vdagent"/var/log/spice-vdagent.log
Basic Format Description: if the program name is queuesort and the log name is queuesort. log, an example is as follows:
: Programname, startswith, "queuesort"/var/log/queuesort. Log
Logs can be separated based on information levels 0 to 7.
For example, local1.err *
Int syslog (INT priority, string message );
Log_emerg: in an emergency, you must notify the technical staff immediately.
Log_alert: a problem that should be corrected immediately. For example, if the system database is damaged, the ISP connection is lost.
Log_crit: important cases, such as hard disk errors and lost backup connections.
Log_err: the error is not urgent. Fix it within a certain period of time.
Log_warning: warning information, not an error. For example, the system disk uses 85%.
Log_notice: it is not an error and does not need to be processed immediately.
Log_info: intelligence information, normal system messages, such as harassment reports and bandwidth data, which do not need to be processed.
Log_debug: contains detailed development information, which is usually used only when debugging a program.
Logs can be separated by the facility level as follows:
Local0. */var/log/1
Local1. */var/log/2
# Local2. */var/log/3
Local3. */var/log/4
Local4. */var/log/5
Local5. */var/log/6
Local6. */var/log/7