annotate wiki/server/moin.fcg @ 3107:c6e39279f83b

refactor logging usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 22:59:30 +0100
parents 80e1a910a2f1
children 79f850129782
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 #!/usr/bin/env python
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
2 # -*- coding: iso-8859-1 -*-
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4 MoinMoin - FastCGI Driver Script
1946
412b50bb3740 add some MoinMoin.server refactoring TODOs
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1172
diff changeset
5
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
6 @copyright: 2007 MoinMoin:ThomasWaldmann
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7 @license: GNU GPL, see COPYING for details.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
8 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
9
3107
c6e39279f83b refactor logging usage
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3105
diff changeset
10 import sys
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
11
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
12 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
13 # or if you did not use setup.py.
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
14 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
15
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
16 # Path of the directory where wikiconfig.py is located.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
17 # YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
18 sys.path.insert(0, '/path/to/wikiconfig')
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
19
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
20 # Path of the directory where farmconfig is located (if different).
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
21 #sys.path.insert(0, '/path/to/farmconfig')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
22
49
cf52f97a5857 merge moin--main--1.3--patch-928
Nir Soffer <nirs@freeshell.org>
parents: 0
diff changeset
23 # Debug mode - show detailed error reports
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
24 #import os
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
25 #os.environ['MOIN_DEBUG'] = '1'
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
26
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
27 from MoinMoin.server.server_fastcgi import FastCgiConfig, run
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
28
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
29 class Config(FastCgiConfig):
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
30 properties = {}
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
31 # properties = {'script_name': '/'} # use this instead of the line above if your wiki runs under "/" url
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
32
2999
e94b940f3a84 add a comment about listen backlog to moin.fcg (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2986
diff changeset
33 # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value!
e94b940f3a84 add a comment about listen backlog to moin.fcg (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2986
diff changeset
34 # backlog = 1
e94b940f3a84 add a comment about listen backlog to moin.fcg (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2986
diff changeset
35
2986
d6fb846dc73c use MoinMoin.server for fastcgi, use Config class, fix logging (port from 1.6)
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2971
diff changeset
36 run(Config)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
37