-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloggingserver.py
More file actions
32 lines (26 loc) · 836 Bytes
/
loggingserver.py
File metadata and controls
32 lines (26 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''
This is the main logging program that implements the socket based
logging server.
'''
# system modules
import os
from twisted.application import service
# custom modules for this server
import loggingprotocol
# create an application instance
application = service.Application("LoggingServer")
# create the logging service
loggingService = loggingprotocol.LoggingService()
loggingService.setServiceParent(application)
# create the logging server web status page
loggingServiceWebServer = loggingprotocol.LoggingServerWebService()
loggingServiceWebServer.setServiceParent(application)
# this section allows the server to run within the wingide debugger
if __name__ == "__main__":
from twisted.scripts.twistd import run
import os
try:
os.unlink('twistd.pid')
except OSError:
pass
run()