1

我正在尝试启动 Orbited,但不幸的是,我遇到了很多问题!首先,easy_install 的问题(已解决)。然后,继续按照http://mischneider.net/?p=125的说明进行操作。但是在使用时orbited -c orbited.cnf我得到以下信息:

Traceback (most recent call last):
  File "C:\Python27\Scripts\orbited-script.py", line 8, in <module>
    load_entry_point('orbited==0.7.11beta3', 'console_scripts', 'orbited')()
  File "C:\Python27\lib\site-packages\orbited-0.7.11beta3-py2.7.egg\orbited\star
t.py", line 133, in main
    logging.config.fileConfig(options.config)
  File "C:\Python27\lib\logging\config.py", line 70, in fileConfig
    formatters = _create_formatters(cp)
  File "C:\Python27\lib\logging\config.py", line 106, in _create_formatters
    flist = cp.get("formatters", "keys")
  File "C:\Python27\lib\ConfigParser.py", line 567, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'formatters'

这是我的配置文件(orbited.cnf):

[listen]
http://:9000
stomp://:61613

[access]
* -> localhost:61613

[global]
session.ping_interval = 300

(编辑:我可能需要一个 [格式] 部分?)我一无所有,而且我找到的大部分资源都指向 orbited.org,自从我对轨道感兴趣的那一天起,它就一直处于关闭状态。请帮帮我!我真的很想开始开发很酷的现场 django 应用程序!

4

2 回答 2

7

tar 文件中有一个示例配置文件。您可以在https://bitbucket.org/desmaj/orbited/src/1a8a47861f1d/daemon/orbited.cfg.example在线找到它

只需从 [loggers] 部分开始复制所有内容。在需要更多调试信息的地方设置相关级别=调试

-- 西德

于 2011-05-27T08:49:41.950 回答
3

以防万一有人只想 C&P 我按照 sid 的建议添加的代码。如果有用,请点赞他的答案,而不是这个!

# new logging configuration using the python stdlib logging.fileConfig
[loggers]
keys = root,orbited,orbited_TCPConnectionResource

[handlers]
keys = console,errors,connections

[formatters]
keys = generic

[logger_root]
level = NOTSET
handlers = console

[logger_orbited]
level = WARN
handlers = errors
qualname = orbited

[logger_orbited_TCPConnectionResource]
level = DEBUG
handlers = connections
qualname = orbited.cometsession.TCPConnectionResource

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = INFO
formatter = generic

[handler_errors]
class = FileHandler
args = ('error.log', 'w')
level = WARN
formatter = generic

[handler_connections]
class = FileHandler
level = DEBUG
formatter = generic
args = ('connections.log', 'w')

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
于 2011-05-27T09:50:26.843 回答