how to configure persistent logging on mikrotik routeros

System logs are basically records of events that occur in a system such as a network router. By default a MikroTik router only keep logs in memory. This means that when the router reboots all the logging historical data is erased and lost. In a real world situation where router logs are needed during router troubleshooting and setup, loosing router logs can be disasterous. This tutorial aims to provide a guide on how to setup persistent logging on a Mikrotik Router by saving system logs to disk. Click on the button below to watch the video tutorial on YOUTUBE


In order to complte this tutorial successfully the following items are required. Please ensure to have these items available before taking implimentation action on this tutorial :
1) Desktop or laptop computer
2) Winbox utility.
3) Internet connection (optional)
4) RouterOS admin access


1)  Open the WINBOX app and log into the Mikrotik router admin user account
2) Configure persistent logging and set it to save all system logs to disk

Step 1: Open Winbox and log into the Mikrotik router admin user account.

1)Connect your Routerboard to a power source, connect an RJ45 ethernet cable to ether2 and the ethernet port of your laptop / desktop

2) If your connection is successful Winbox will automatically detect all connected Routerboard devices as shown in the image, if you do not see your routerboard device try to click the refresh button under the neighbours tab or try to power cycle your routerboard.

Step 2: Configure Persistent Logging And Set It To Save All System Logs To Disk

3) Once you have logged in successfully browse to “SYSTEM > LOGGING”.  On the “RULES” tab double click on each default rule. On the “LOG RULE” window that appears click on the “COPY” button to create a duplicate and adjust the Action dropdown to disk. Press the “OK” button to save the new rule.

4) Repeat step 3 until you have duplicated all 5 (critical, error, info, and warning) default logging rules. The image shows an example of this.

Step 3 : Setup Log File Retention Settings

5) Browse to “SYSTEM > LOGGING”. Select the “ACTIONS” tab where you can configure the  file size liit and number of log files to keep. For disk performance reasons 3000 lines per log file is recommended but you may specify more lines depending on your mikrotik router model.