Feature #2311

Allow negative scope filtering in the logger

Added by N. Köster almost 9 years ago. Updated almost 9 years ago.

Status:RejectedStart date:06/02/2015
Priority:NormalDue date:
Assignee:J. Moringen% Done:

0%

Category:Common Lisp Tools
Target version:rsb-0.13

Description

According to the logger documentation, it is only possible to positively filter scopes, e.g.:

tools0.12 logger --on-error=continue --filter 'scope "/some_important_scope/"' --style monitor/timeline

gives you all scopes that match the scope " /some_important_scope/ "

However, it seems that it is not possible to negate this filter in any way. Something I'd expect possible is (or however the correct syntax would be ;)):

tools0.12 logger --on-error=continue --filter 'scope :scope "/some_unimportant_scope/" :negate' --style monitor/timeline

which would filter out the named scope (and possibly all its subscopes...).


Related issues

Duplicates Robotics Service Bus - Enhancement #1777: Add commandline options to exclude scopes from logging In Progress 02/18/2014

History

#1 Updated by J. Moringen almost 9 years ago

  • Duplicates Enhancement #1777: Add commandline options to exclude scopes from logging added

#2 Updated by J. Moringen almost 9 years ago

It is already possible to construct composite filter expressions involving not, and, or. There is however no convenient syntax1 for writing these down.

In the meantime, use

$ rsb-tools logger -f 'not :children #.(list (rsb.filter:filter :scope :scope "/foo" :exact? EXACT)'

where EXACT is either t or nil and controls whether to exclude sub-scopes.

1 Well, I have implemented such a syntax, but it is not in master.

#3 Updated by J. Moringen almost 9 years ago

  • Status changed from New to Rejected

#4 Updated by N. Köster almost 9 years ago

ah thanks! I did not find the existing issue in my search!

J. Moringen wrote:

In the meantime, use
[...]

where EXACT is either t or nil and controls whether to exclude sub-scopes.

Unfortunately I am not quite sure how to use this? Would I have to replace EXACT? And with a literal 't' or 'nil'?

#5 Updated by J. Moringen almost 9 years ago

N. Köster wrote:

Unfortunately I am not quite sure how to use this? Would I have to replace EXACT? And with a literal 't' or 'nil'?

Yes, literal t (true) or nil (false).

$ tools0.12 logger -f 'not :children #.(list (rsb.filter:filter :scope :scope "/system/monitoring/" :exact? EXACT)' --debug
                                                                                                                  ^ missing ")" 
                                                                                                            ^ t or nil

Also available in: Atom PDF