Hi,
Does anybody know if there is a way to export the Routerboard’s log to a file?
Thanks
Hi,
Does anybody know if there is a way to export the Routerboard’s log to a file?
Thanks
/system logging
add action=disk topics=info
And can the logfile be given a custom name?
Check the documentation: https://wiki.mikrotik.com/wiki/Manual:System/Log#Logging_to_file
If you want to save the current log buffer to disk, use:
/log print file=log.txt
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).
Thanks Rob…
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