Not out of the box.


Egads, I think you're right. These aren't actual warnings, are they? They're log calls. That should be changed.

- C




Actually, there is a way, but it's a bit heavy-handed and imprecise. In zope.conf, do (untested):

<warnfilter>
 action ignore
 message .*has a security declaration for.*
</warnfilter>

Here's the ZConfig schema description of the "warnfilter" element:

  <multisection type="warnfilter" attribute="warnfilters" name="*"
                dataype="zLOG.warn_filter_handler">
    <!-- from zLOG -->
    <description>
A multisection which allows a user to set up a Python "warning" filter.
    The following keys are valid within a warnfilter section:

      action:  one of the following strings:

           "error"   turn matching warnings into exceptions
           "ignore"  never print matching warnings
           "always"  always print matching warnings
           "default" print the first occurrence of matching warnings
                     for each location where the warning is issued
           "module"  print the first occurrence of matching warnings
                     for each module where the warning is issued
           "once"    print only the first occurrence of matching
                     warnings, regardless of location

      message:  a string containing a regular expression that the
                warning message must match (the match is compiled to
                always be case-insensitive)

      category: a Python dotted-path classname (must be a subclass of
Warning) of which the warning category must be a subclass in
                order to match

      module:   a string containing a regular expression that the
                module name must match (the match is compiled to be
                case-sensitive)

      lineno:   an integer that the line number where the warning
                occurred must match, or 0 to match all line numbers
    </description>
  </multisection>


- C


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to