473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

request for logging SyslogHandler help

Hi,

Perhaps this is as much a Unix question as a Python question.

I really like the Python logging module, and I've used it extensively,
with good results. Now I have a requirement to add a SysLogHandler, and
it's just not working. It looks like the socket is connecting, but nothing
comes out on the log. (Fedora Core 2 /var/log/messages)

The simplest of many configurations I have tried is included below.
A FileHandler in the same config file works fine.

Does anyone have experience in this area? Do I need a special format or
something?

[handler_syslog]
class=handlers.SysLogHandler
level=NOTSET
formatter=verboseformat
args=()

--
Doug Fort, Consulting Programmer
http://www.dougfort.com

Jul 18 '05 #1
1 2444
> I really like the Python logging module, and I've used it extensively,
with good results. Now I have a requirement to add a SysLogHandler, and
it's just not working. It looks like the socket is connecting, but nothing
comes out on the log. (Fedora Core 2 /var/log/messages)

The simplest of many configurations I have tried is included below.
A FileHandler in the same config file works fine.

Does anyone have experience in this area? Do I need a special format or
something?

[handler_syslog]
class=handlers.SysLogHandler
level=NOTSET
formatter=verboseformat
args=()


Please check that the syslog destination is the local machine
(localhost) and that it is configured to work through UDP, on the
standard syslog port (514). Also, try with a short message format not
containing newlines (I would guess that "verboseformat" might generate
large messages).

Best of luck,
Vinay Sajip
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andreas Jung | last post by:
I am trying to write a custom logger with a custom handler: class MyHandler(StreamHandler): pass class Logger: def __init__(self): self._l = logging.getLogger('someident')...
6
by: Ville Vainio | last post by:
Just posting this for the sake of google: Like everyone else, I figured it's time to start using the 'logging' module. I typically want to dump "info" level (and up) log information to...
9
by: michael | last post by:
Hi there, I am stuck while trying to use the logging facilities. Its not logging :-) Can somebody point me to a solution ? The following snipplets are used ...
7
by: Shapiro | last post by:
I have a scenario where I log a resquest to a database table and update the request with a corresponding response including the response time. I am using an HttpModule to do this. My challenge...
7
by: itay_k | last post by:
Hi, I dont understand why this is so complicated, just to add one line of cookie header on the GET request. This is my unworking code: import time import Cookie import cookielib, urllib2
7
by: vvkl | last post by:
I have readed a example code from MSDN about FormsAuthenticationTicket calss, but there's a line I can't understand : 'strRedirect = Request;' What's the mean in which square brackets? Thank...
0
by: jay | last post by:
Hello, I've been using the python logging module a lot lately, and I've come across an instance where I need some new levels. Specifically, python does not include ALERT and NOTICE in the...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
2
by: =?Utf-8?B?d2FsdGVy?= | last post by:
Hi there... we have a list of internal websites. For logging purpose, we would like to attach some client side info in each HTTP request before submit to server. Two options for us : 1) each...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.