Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
ucollect
Commits
0282b503
Commit
0282b503
authored
Apr 03, 2013
by
Michal 'vorner' Vaner
Browse files
Initialize logging
parent
f33a758b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/master/collect-master.py
View file @
0282b503
#!/usr/bin/python
from
twisted.internet
import
reactor
from
twisted.internet.endpoints
import
TCP6ServerEndpoint
import
logging
from
client
import
ClientFactory
from
plugin
import
Plugins
import
count_plugin
import
buckets_plugin
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
format
=
'%(name)s@%(module)s:%(lineno)s
\t
%(asctime)s
\t
%(levelname)s
\t
%(message)s'
)
plugins
=
Plugins
()
count_plugin
.
CountPlugin
(
plugins
)
buckets_plugin
.
BucketsPlugin
(
plugins
)
# Some configuration, to load the port from?
endpoint
=
TCP6ServerEndpoint
(
reactor
,
5678
)
endpoint
.
listen
(
ClientFactory
(
plugins
))
logging
.
info
(
'Init done'
)
reactor
.
run
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment