Save log into file

Hi there,

How can i save the log into a file.

The file should be named like “log_date.log” and change every day.


Like this :
(log_28012003.log)
jan/28/2003 21:28:34 user admin logged out via console
jan/28/2003 21:28:34 user admin logged out via console
jan/28/2003 21:54:35 user admin logged in via console
jan/28/2003 22:09:24 ipsec peer removed by admin
jan/28/2003 22:10:19 ipsec policy changed by admin
jan/28/2003 23:18:02 pool our-dhcp-clients added by admin

(log_29012003.log)
jan/29/2003 05:55:44 log configuration changed by admin
jan/29/2003 06:13:33 log configuration changed by admin
jan/29/2003 06:13:33 log configuration changed by admin

into file.


Thanks.

I’d say you can’t with RouterOS capabilities.

But your requirement sounds like operating a syslog server could be a good idea - there you could realize things like that…

download syslog program from http://www.mikrotik.com

I’ve posted somewhere in the forum a PERL script that utilises a syslog process and stores data in MySQL database…

Where?

10x.

Try the search function here in the forum - it really works :wink:

Searching for “perl syslog mysql” would quickly lead you to the following thread (see second post there):
http://forum.mikrotik.com//viewtopic.php?t=2298&highlight=perl+syslog+mysql