jmj / scribehandler Goto Github PK
View Code? Open in Web Editor NEWScribe Handler for python logging
License: GNU General Public License v2.0
Scribe Handler for python logging
License: GNU General Public License v2.0
Using ScribeHandler, I get an exception trying to log a message.
Exception ends with:
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ScribeHandler-0.05-py2.6.egg/ScribeHandler.py", line 186, in emit
log_entry = scribe.LogEntry(category=category, message=msg)
TypeError: init() got an unexpected keyword argument 'category'
CODE TO REPRODUCE IS:
request_logger = logging.getLogger('ScribeLogger')
request_logger.setLevel(logging.DEBUG)
handler = ScribeHandler.ScribeHandler(
host=SCRIBE_HOST,
port=SCRIBE_PORT,
category='ba_request')
request_logger.addHandler(handler)
request_logger.info("blah")
CODE TO FIX IS:
in ScribeHandler.emit() -
REPLACE: log_entry = scribe.LogEntry(category=category, message=msg)
WITH: log_entry = scribe.LogEntry({"category":category, "message":msg})
Version used:
ScribeHandler: 0.05
Python: 2.6
OS: OS X 10.6.8
Scribe python library: 2.0
This is not a bug or anything, I just wanted to know what's the reasoning behind closing and opening the transport on emit(), especially if using a non blocking io. it seems more logical to keep a persistent connection and reconnect on disconnects.
Hi,
I downloaded ScribeHandler and want to use as a module it without installing it.
In the module, there is a line importing "scribe", which is not installed:
File ".../main.py", line 14, in <module>
from cloudfusion.ScribeHandler import ScribeHandler
File "cloudfusion/ScribeHandler/ScribeHandler.py", line 29, in <module>
from scribe import scribe
ImportError: No module named scribe
Where does the "scribe" module come from? It is not referenced in the setup file as far as I can tell.
Thanks,
joe42
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.