syslo-ng to mysql and to plaintext file
hello, i've configure successfuly the syslog-ng server to save logs on mysql 4.0and i would like it to store the logs (just for a test) on a text file ( example.txt), so i was searching aroun and found that i should add the followin line to syslog-ng.conf: destination file_text{ file("/var/log/example.txt"); }; i don't want to mess anything and i was wondering if it's ok or if anybody has set this before, i don't want it to stop saving it on mysql i just want syslog-ng to save in both (mysql and example.txt) at the same time... thanx for the help... -- Ciao,Javier linux user #393724
javier rojas wrote:
hello,
i've configure successfuly the syslog-ng server to save logs on mysql 4.0 and i would like it to store the logs (just for a test) on a text file (example.txt), so i was searching aroun and found that i should add the followin line to syslog-ng.conf:
destination file_text{ file("/var/log/example.txt"); };
i don't want to mess anything and i was wondering if it's ok or if anybody has set this before, i don't want it to stop saving it on mysql i just want syslog-ng to save in both (mysql and example.txt) at the same time...
thanx for the help...
-- Ciao,Javier linux user #393724
------------------------------------------------------------------------
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
yes, i have this setup. here is the examples from my conf with the plaintext section: destination hosts { file("/var/log/syslogs/$HOST.$FACILITY" owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)); }; log { source(client_tcp); destination(hosts); }; log { source(client_udp); destination(hosts); };
Just set up the destination as you described below and then set up another log rule, assuming you're going to use the same source and filter. then just add log { source(src); filter(filter_1); destination(file_text); }; you can really have as many "log" entries as you want. i write to several different files. hope that helps. chris On 8/1/05, javier rojas <javier.rojasr@gmail.com> wrote:
hello,
i've configure successfuly the syslog-ng server to save logs on mysql 4.0and i would like it to store the logs (just for a test) on a text file ( example.txt), so i was searching aroun and found that i should add the followin line to syslog-ng.conf:
destination file_text{ file("/var/log/example.txt"); };
i don't want to mess anything and i was wondering if it's ok or if anybody has set this before, i don't want it to stop saving it on mysql i just want syslog-ng to save in both (mysql and example.txt) at the same time...
thanx for the help...
-- Ciao,Javier linux user #393724 _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
participants (3)
-
javier rojas
-
Ken Garland
-
sawall