comparison moin.py @ 3111:79f850129782

logging: fix server scripts to load logging config, fix logging configs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Feb 2008 14:01:08 +0100
parents ccf6d7ffb310
children
comparison
equal deleted inserted replaced
3110:a48929a5036c 3111:79f850129782
4 4
5 @copyright: 2007 MoinMoin:ForrestVoight 5 @copyright: 2007 MoinMoin:ForrestVoight
6 @license: GNU GPL, see COPYING for details. 6 @license: GNU GPL, see COPYING for details.
7 """ 7 """
8 8
9 import sys 9 import os, sys
10 import os
11
12 from MoinMoin.script import MoinScript
13 10
14 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX 11 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX
15 # or if you did not use setup.py. 12 # or if you did not use setup.py.
16 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages') 13 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
17 14
18 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0]))) 15 moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
19 sys.path.insert(0, moinpath) 16 sys.path.insert(0, moinpath)
20 os.chdir(moinpath) 17 os.chdir(moinpath)
21 18
19 from MoinMoin import log
20 log.load_config('wiki/config/logging/stderr') # XXX maybe fix path
21
22 from MoinMoin.script import MoinScript
23
22 if __name__ == '__main__': 24 if __name__ == '__main__':
23 sys.argv = ["moin.py", "server", "standalone"] 25 sys.argv = ["moin.py", "server", "standalone"]
24 MoinScript().run() 26 MoinScript().run()