Community discussions

MikroTik App
 
User avatar
LucZWFM
Member Candidate
Member Candidate
Topic Author
Posts: 130
Joined: Tue Dec 26, 2017 10:47 pm
Location: Bergen op Zoom, The Netherlands

Export log?

Tue Jan 02, 2018 1:22 pm

Hi,

Does anybody know if there is a way to export the Routerboard's log to a file?

Thanks
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Export log?

Tue Jan 02, 2018 1:33 pm

/system logging
add action=disk topics=info
 
User avatar
LucZWFM
Member Candidate
Member Candidate
Topic Author
Posts: 130
Joined: Tue Dec 26, 2017 10:47 pm
Location: Bergen op Zoom, The Netherlands

Re: Export log?

Tue Jan 02, 2018 1:54 pm

And can the logfile be given a custom name?
 
nescafe2002
Forum Veteran
Forum Veteran
Posts: 914
Joined: Tue Aug 11, 2015 12:46 pm
Location: Netherlands

Re: Export log?

Tue Jan 02, 2018 2:20 pm

Check the documentation: https://wiki.mikrotik.com/wiki/Manual:S ... ng_to_file

If you want to save the current log buffer to disk, use:
/log print file=log.txt
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Export log?  [SOLVED]

Tue Jan 02, 2018 2:23 pm

To export the current log buffer: /log print file=anyname
Then download the file.

For continuous logging use the disk action as above, you can also set a name and number of files (it will rotate them).

For advanced usage, set logging to an external syslog server and process everything there (including saving to disk, database, whatever).
 
User avatar
LucZWFM
Member Candidate
Member Candidate
Topic Author
Posts: 130
Joined: Tue Dec 26, 2017 10:47 pm
Location: Bergen op Zoom, The Netherlands

Re: Export log?

Tue Jan 02, 2018 2:57 pm

Thanks Rob...
 
spoken
just joined
Posts: 2
Joined: Mon Jun 12, 2023 3:46 pm

Re: Export log?

Sun Sep 24, 2023 9:36 pm

If you don't have enough storage space on your device, you can store the stdout of "ssh" directly in a file on your computer. For example:
ssh mt-device '/log print where time~"^[0-9]"' > /tmp/mt-device-today.log

Who is online

Users browsing this forum: AshuGite, etm7469, vingjfg and 24 guests