Community discussions

MikroTik App
 
James56
just joined
Topic Author
Posts: 7
Joined: Fri Aug 21, 2020 9:07 pm

How set logs back to default?

Tue Sep 01, 2020 11:54 pm

In a moment of weakness I set:

/system logging action add name=file target=disk disk-file-name=log
and
/system logging add action=file

(from the Manual)

and now the logs are full of debug messages.

Is there a way to set logs back to default ?

Thanks.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: How set logs back to default?

Wed Sep 02, 2020 12:32 am

Prove the results of "/system logging export" then someone can assist to get all back to default
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13105
Joined: Thu Mar 03, 2016 10:23 pm

Re: How set logs back to default?  [SOLVED]

Wed Sep 02, 2020 8:29 am

There are two places which configure logging: /system logging action and /system logging. The former is more general and sets destinations of log messages, while the later configure actual logs to be generated (and stored).

By default, there are 4 entries in /system logging:
[user@router] /system logging> print
Flags: X - disabled, I - invalid, * - default 
 #    TOPICS                          ACTION                         PREFIX    
 0  * info                            memory                                   
 1  * error                           memory                                   
 2  * warning                         memory                                   
 3  * critical                        echo
There are probably more if you added some logging actions and you should (prior to removing entries in /system logging action) remove entries with action set to custom actions (see below) by executing commands such as remove <index> after you executed print, with <index> being index number from preceding print command output.


By default, there are 4 entries in /system logging action:
[user@router] /system logging action> print
Flags: * - default 
 0 * name="memory" target=memory memory-lines=1000 memory-stop-on-full=no 

 1 * name="disk" target=disk disk-file-name="flash/log" 
     disk-lines-per-file=1000 disk-file-count=2 disk-stop-on-full=no 

 2 * name="echo" target=echo remember=yes 

 3 * name="remote" target=remote remote=0.0.0.0 remote-port=514 
     src-address=0.0.0.0 bsd-syslog=no syslog-time-format=bsd-syslog 
     syslog-facility=daemon syslog-severity=auto
(disk-file-name in rule #1 could be different depending on device type).

With your additions you'll see additional actions and those you can remove (by executing e.g. remove <index> after you executed print, with <index> being index number from preceding print command output).
 
James56
just joined
Topic Author
Posts: 7
Joined: Fri Aug 21, 2020 9:07 pm

Re: How set logs back to default?

Wed Sep 02, 2020 12:12 pm

Perfect, Thank you.

I had:
[admin@MikroTik] > /system logging print 
Flags: X - disabled, I - invalid, * - default 
 #    TOPICS                                                                             ACTION                 PREFIX     
 0  * info                                                                               memory                                                                                        
 1  * error                                                                              memory                                                                                        
 2  * warning                                                                            memory                                                                                        
 3  * critical                                                                           echo                                                                                          
 4                                                                                       file    
and
/system logging remove 4
Fixed it.

BTW there does not seem to be anything about this at: https://wiki.mikrotik.com/wiki/Manual:System/Log