I'm trying to create a private Python index using PyPiServer using the API.
According to the documentation I can specify the verbosity and the log file in the pypiserver app setup.
This is what I have:
import pypiserver
from pypiserver import bottle
app = pypiserver.app(root='./packages', password_file='.htpasswd', verbosity=4, log_file='F:\repo\logfile.txt')
bottle.run(app=app, host='itdevws09', port=8181, server='auto')
However when I start it using python mypyserver.py
, the index starts up normally and works, however no log file is created. If I create one manually, the log file isn't actually written to.
If I start the pypiserver using the command line using:
pypi-server -p 8080 -P .htpasswd -vvvv --log-file F:/repo/logfile.txt ./packages
The log file is created and written to as normal.
I have tried putting the log-file and verbosity in the bottle.run()
method but that doesn't work either. How can I get the logging to work?