2018-04-27 8:20 GMT+02:00 putcha narayana <[email protected]>: > if ($syslogseverity <= $.configuredSeverity) -- I could not find this > usage easily in the documentation for 8.26.0. >
I see what you mean - https://www.rsyslog.com/doc/v8-stable/rainerscript/control_structures.html#if is not generic enough. It should just say if(expr) and refer to the expression definition that exists before the "if" definition. > > if ($syslogseverity <= "6") -- R.H.S value must be enclosed within "". > no, you do not need to enclose numerical values that are meant as numerical values into "". You only do that if you want strings. Here, it makes no sense at all to me. Rainer > I learn it the hardway. i assumed it is exactly like other languages C, > java, JavaScript, bash, ruby, etc as mentioned under control section. But > "" is mandatory is missing. It will not bring the world down but thinking > from perspective of a Novice it helps/expedites understanding. That is my > opinion. > > I guess i consume enough valuable time of yours on this topic 😊. > > ------------------------------ > *From:* David Lang <[email protected]> > *Sent:* Wednesday, April 25, 2018 5:33 PM > *To:* putcha narayana > *Cc:* Rainer Gerhards; rsyslog-users > *Subject:* Re: [rsyslog] Urgent, need help with correct usage of local > variables in an action > > On Wed, 25 Apr 2018, putcha narayana wrote: > > > set $.configuredSeverity = "6"; > > if ($syslogseverity <= $.configuredSeverity) -- this is allowed and we > can add to the documentation. > > Yes, this is allowed, any variable comparison is allowed > > you can also do > > if ($syslogseverity <= "6") > > I'm not sure what would need to be added to the documentation, but if it's > not > clear that both of these would be allowed, please submit a PR (or even > just an > issue with suggested new wording) to help us make it clear > > David Lang > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

