To use, simply 'import logging' and log away!
"""
-import sys, logging, socket, types, os, string, cPickle, struct, time, glob
+import sys, logging, socket, types, os, string, struct, time, glob
+try:
+ import cPickle as pickle
+except ImportError:
+ import pickle
try:
import codecs
if ei:
dummy = self.format(record) # just to get traceback text into record.exc_text
record.exc_info = None # to avoid Unpickleable error
- s = cPickle.dumps(record.__dict__, 1)
+ s = pickle.dumps(record.__dict__, 1)
if ei:
record.exc_info = ei # for next handler
slen = struct.pack(">L", len(s))