I was sent via email an alternative solution which is working even
better for me.
In Python code use:
class AppFileHandler(logging.FileHandler):
def __init__(self, *args):
filename, mode = args
if not os.path.isabs(filename):
filename = os.path.join(os.environ['APPD
I figured out what I was after.
logfn = os.path.join(os.environ['APPDATA'], directory, filename)
ensure_path(logfn)
logging.config.fileConfig("logging.conf", defaults={'logfn': logfn})
In the config file use:
[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=(r'%(
I figured out a method to enumerate all loggers.
root = logging.getLogger()
for key in root.manager.loggerDict.keys():
logger = logging.getLogger(key)
--
http://mail.python.org/mailman/listinfo/python-list
I have a logging configuration file that I load via
logging.config.fileConfig.
The configuration file, configures a FileHandler to log to file.
I wish to initialize the FileHandler to the path
os.environ['APP_DATA'].
However, I don't know how to configure anything other than a static
path.
I also
On Jan 10, 8:21 pm, Jeffrey Britton wrote:
> I am building a standalone Windows executable using cx_Freeze.
> The resulting executable will not run and writes the following error
> to the console.
>
> ImportError: could not import gobject (error was: 'No module named
> go
I am building a standalone Windows executable using cx_Freeze.
The resulting executable will not run and writes the following error
to the console.
ImportError: could not import gobject (error was: 'No module named
gobject')
The project using the gtk libraries for Cairo and Pango on Windows.
The