5 Sep
2007
5 Sep
'07
9:18 p.m.
I am logging locally to destination hosts { file("/opt/log/HOSTS/$YEAR/$MONTH/$DAY/$HOST/$PROGRAM" owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));}; I am also logging to a mysql database destination d_mysql { pipe("/tmp/mysql.pipe" template("INSERT INTO logs (host, facility, priority, level, tag, date, time, program, msg) VALUES ('$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG');\n") template-escape(yes)); }; What is the best way to handle log rotation for each? Best Regards, John