本文整理汇总了Python中Logging.success方法的典型用法代码示例。如果您正苦于以下问题:Python Logging.success方法的具体用法?Python Logging.success怎么用?Python Logging.success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging.success方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Server
# 需要导入模块: import Logging [as 别名]
# 或者: from Logging import success [as 别名]
except FileNotFoundError:
config.write_to_file(CONFIG_PATH)
config = config.read_from_file(CONFIG_PATH)
server = Server(config.server_address, debug=config.debug, compression_level=config.compression_level)
broadcast = Broadcast()
# Populating broadcast channels with all channels defined in Handler.Channels
for channel in Handler.Channels.__dict__:
if not channel.startswith("_"):
broadcast.add_channel(Handler.Channels.__dict__[channel])
compile = Compile(config.source_path, config.binary_path)
w_sync = SyncServer(config.binary_path, Handler.Channels.WALLABY, debug=config.debug, deleted_db_path="deleted-w.pickle")
s_sync = SyncServer(config.source_path, Handler.Channels.SUBLIME, debug=config.debug, deleted_db_path="deleted-s.pickle", modified_hook=compile.compile)
try:
Logging.header("fl0w server started on '%s:%d'" % (config.server_address[0], config.server_address[1]))
server.run(Handler,
{"broadcast" : broadcast,
"routes" : {"info" : Info(), "wallaby_control" : WallabyControl(),
"get_info" : GetInfo(), "compile" : compile, "std_stream" : StdStream(),
WALLABY_SYNC_ROUTE : w_sync,
SUBLIME_SYNC_ROUTE : s_sync}})
except KeyboardInterrupt:
Logging.header("Gracefully shutting down server.")
w_sync.stop()
s_sync.stop()
server.stop()
Logging.success("Server shutdown successful.")