Community discussions

MikroTik App
 
mikOS
just joined
Topic Author
Posts: 4
Joined: Tue Nov 02, 2021 8:55 pm

Logging with multiple topics

Wed Jan 05, 2022 7:01 pm

Hi mates,
i can't find an explanation to this but probably i figured it out with some tests.

Question:What's the logic behind logging with topic definition, if more then one topics are defined in a single statement? It's work like logic AND or OR?

Reading the doc under Logging configuration, it's seem possible to define a list of topics, so i'm wondering if this list is usable just to filter specific entry like the following or to make with a single entry multiple matches:
Topics

Each log entry have topic which describes the origin of log message. There can be more than one topic assigned to log message. For example, OSPF debug logs have four different topics: route, ospf, debug and raw.
11:11:43 route,ospf,debug SEND: Hello Packet 10.255.255.1 -> 224.0.0.5 on lo0
11:11:43 route,ospf,debug,raw PACKET:
11:11:43 route,ospf,debug,raw 02 01 00 2C 0A FF FF 03 00 00 00 00 E7 9B 00 00
11:11:43 route,ospf,debug,raw 00 00 00 00 00 00 00 00 FF FF FF FF 00 0A 02 01
11:11:43 route,ospf,debug,raw 00 00 00 28 0A FF FF 01 00 00 00 00

With this configuration i except to see any dns OR firewall syslog messages
/system/logging>  print detail where action =remote 
Flags: X - disabled, I - invalid; * - default 
 0  * topics=dns,firewall prefix="TEST:" action=remote 
but i'm not able to see any kind of message so i believe a message is sent when both topics are matched.

If I change the configuration to the following:
/system/logging> print detail where action =remote
Flags: X - disabled, I - invalid; * - default 
 0  * topics=dns prefix="TEST DNS:" action=remote 

 5    topics=firewall prefix="TEST FIREWALL:" action=remote 
i got what i need...syslog for both.
Is this the expected behaviors?


Thanks in adv

Who is online

Users browsing this forum: No registered users and 11 guests