[syslog-ng] discussion: Should ptbtool test validate types

Balazs Scheidler bazsi77 at gmail.com
Sat Aug 19 21:12:18 UTC 2023


You are right it should do that. Can you open an issue?

On Fri, Aug 18, 2023, 16:53 Evan Rempel <erempel at uvic.ca> wrote:

> Now that syslog-ng has type hinting should the pdbtool test also validate
> the types of any values specified for a pattern.
>
>
> <rule id="pid1" class="myclass" provider="me">
>     <patterns>
>         <pattern>some pattern @NUMBER:mynum@ with number</pattern>
>     </patterns>
>     <tags>
>         <tag>rate</tag>
>     </tags>
>     <values>
>        <value name="more" type="integer">100A</value>
>     </values>
>     <examples>
>        <example>
>           <test_message program="some pattern 123 with number
> </test_message>
>           <test_values>
>              <test_value name="mynum" type="integer">123</test_value>
>           </test_values>
>        </example>
>     </examples>
> </rule>
>
>
> Currently the test_values are verified for both the value, and the type
> that the pattern parses, however, none of the values that are used to
> enrich this message are verified for type.
>
> This results in a patterndb that passes validation, yet will fail at the
> time the pattern matches a log message.
>
>
> comments?
>
> --
> Evan
>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20230819/1f399c21/attachment.htm>


More information about the syslog-ng mailing list