On 13/01/2012 20:17, Chris Withers wrote:
Your package has the same unicode problem :
import logging,logging.handlers
from mailinglogger.MailingLogger import MailingLogger
mailingLogger = MailingLogger(mailhost=('smtp.example.com',
25),fromaddr='t...@example.com',toaddrs=('t...@example.com',))
LO
Hi Norbert,
On 05/07/2010 13:22, norbert wrote:
On 5 juil, 13:17, Chris Withers wrote:
try MailingLogger:
If you have unicode problems with that, I'd be interested in fixing them!
Your package has the same unicode problem :
import logging,logging.handlers
from mailinglogger.MailingLogger im
> Well, you could use an approach like the one suggested here:
>
> http://plumberjack.blogspot.com/2010/07/using-custom-formatter-to-dea...
That's nice, thanks. I'll use something like this. Just a thought : I
will use "errors=replace" in the call to the encode method to be sure
that the logger do
norbert gmail.com> writes:
>
> crash with a UnicodeError. I can't see any workaround, except by
> subclassing SMTPHandler's emit method to be unicode-aware or at least
> URF-8 aware.
>
Well, you could use an approach like the one suggested here:
http://plumberjack.blogspot.com/2010/07/using-
On Jul 5, 2:35 pm, Antoine Pitrou wrote:
> > a FileHandler works as expected, the log file being UTF-8 encoded.
>
> Ouch. Implicit encoding sounds like a bad behaviour.
UTF-8 is only used as a fallback in an exception handler, you can use
any supported encoding using the encoding= keyword argumen
> > Ouch. Implicit encoding sounds like a bad behaviour.
Looking at the FileHandler source (
http://svn.python.org/view/python/trunk/Lib/logging/__init__.py?view=markup
) : the utf-8 encoding is a fallback. But *FileHandler family let you
specify the encoding you want, so that's OK I think.
But S
Antoine Pitrou wrote:
On Mon, 5 Jul 2010 06:17:38 -0700 (PDT)
norbert wrote:
a FileHandler works as expected, the log file being UTF-8 encoded.
Ouch. Implicit encoding sounds like a bad behaviour.
Yes indeed, hence my question on python-dev...
Chris
--
Simplistix - Content Management, Bat
On Mon, 5 Jul 2010 06:17:38 -0700 (PDT)
norbert wrote:
>
> a FileHandler works as expected, the log file being UTF-8 encoded.
Ouch. Implicit encoding sounds like a bad behaviour.
> The
> SMTPHandler is the only logger I know with this problem, maybe
> connected to SMTPLib implementation ?
I su
On 5 juil, 14:32, Chris Withers wrote:
> norbert wrote:
> > Your package has the same unicode problem :
> > import logging,logging.handlers
> > from mailinglogger.MailingLogger import MailingLogger
> > mailingLogger = MailingLogger(mailhost=('smtp.example.com',
> > 25),fromaddr='t...@example.com',
norbert wrote:
Your package has the same unicode problem :
import logging,logging.handlers
from mailinglogger.MailingLogger import MailingLogger
mailingLogger = MailingLogger(mailhost=('smtp.example.com',
25),fromaddr='t...@example.com',toaddrs=('t...@example.com',))
LOG = logging.getLogger()
LOG
On 5 juil, 13:17, Chris Withers wrote:
> try MailingLogger:
>
> If you have unicode problems with that, I'd be interested in fixing them!
Your package has the same unicode problem :
import logging,logging.handlers
from mailinglogger.MailingLogger import MailingLogger
mailingLogger = MailingLogger
norbert wrote:
I want to send error messages with SMTPHandler logging. But
SMTPHandler does not seem to be unicode aware. Is there something
doable without playing with sys.setdefaultencoding ?
try MailingLogger:
http://www.simplistix.co.uk/software/python/mailinglogger
If you have unicode pr
Hello,
I want to send error messages with SMTPHandler logging. But
SMTPHandler does not seem to be unicode aware. Is there something
doable without playing with sys.setdefaultencoding ?
import logging,logging.handlers
smtpHandler =
logging.handlers.SMTPHandler(mailhost=("smtp.example.com",25),
fr
13 matches
Mail list logo