Giter VIP home page Giter VIP logo

ratelimitingfilter's People

Contributors

donkirkby avatar michel-slm avatar pstoll avatar saimecs avatar wkeeling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ratelimitingfilter's Issues

ratelimitingfitler is now part of Fedora

Hey,
I've build an RPM package out of this repository for Fedora.

It is currently available in Fedora 27, Fedora 28, and Rawhide.

You can install with:
dnf install python{2,3}-ratelimitingfilter

TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Hey,
When logging just an numeric value, and rate limiting kicks in, a TypeError is raised, as the library tries to concatenate an int and str.

eg.

for x in range(100):
    log.info(x)
  File "/home/mnuttall/.pyenv/versions/3.6.5/lib/python3.6/logging/__init__.py", line 718, in filter
    result = f.filter(record)
  File "/home/mnuttall/.local/share/virtualenvs/catalog-ilphx365/lib/python3.6/site-packages/ratelimitingfilter/ratelimitingfilter.py", line 74, in filter
    num=bucket.limited)
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Otherwise, thanks for the lib ๐Ÿ‘

Only once messages

Hi,

Nice library! I'm looking a way to setup a throttling that passes a record only once. Is it possible with your filters?

BUG: record.msg is being rendered without clearing args

record.msg = '{msg}{linesep}... {num} additional messages suppressed'.format(

By using getMessage(), you are omitting any formatting parameter, this will cause an issue when the logger uses args

For example: logger.info("Example: %s", "text") will be rendered twice while the second time it will be something similar to
"Example: text" % ("text",)

In order to fix this, you only need to set record.args to an empty tuple

Missing from pypi

This looks like a useful library. Would you be willing to put it on pypi?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.