jeffreyparker / concurrentloghandler Goto Github PK
View Code? Open in Web Editor NEWFork of http://pypi.python.org/pypi/ConcurrentLogHandler/ with a relaxed setuptools version requirement
License: Apache License 2.0
Fork of http://pypi.python.org/pypi/ConcurrentLogHandler/ with a relaxed setuptools version requirement
License: Apache License 2.0
You can install this module by issuing the following command: python setup.py install To build a Python "egg", use the following: python seutp.py bdist_egg # Copy the .egg file from under the "dist" folder Here is a simple usage example: from logging import getLogger, INFO from cloghandler import ConcurrentRotatingFileHandler import os log = getLogger() # Use an absolute path to prevent file rotation trouble. logfile = os.path.abspath("mylogfile.log") # Rotate log after reaching 512K, keep 5 old copies. rotateHandler = ConcurrentRotatingFileHandler(logfile, "a", 512*1024, 5) log.addHandler(rotateHandler) log.setLevel(INFO) log.info("Here is a very exciting log message, just for you") To use this module from a logging config file, use a handler entry like this: [handler_hand01] class=handlers.ConcurrentRotatingFileHandler level=NOTSET formatter=form01 args=("rotating.log", "a", 512*1024, 5) Note: you must have a "import cloghandler" before you call fileConfig(). For more information see http://docs.python.org/lib/logging-config-fileformat.html NOTES: This module has not yet be tested in a multi-threaded environment. I see no reason why this should be an issue, but no stress-testing has been done in a threaded situation. If this is important to you, you could always add threading support to the stresstest.py script and send me the patch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.