diff --git a/bin/client.py b/bin/client.py index 7756af8..7f91973 100644 --- a/bin/client.py +++ b/bin/client.py @@ -23,13 +23,13 @@ except (ModuleNotFoundError, ImportError, ImportWarning): class client(mp.Process, pyglet.window.Window): def __init__(self, logger, dev_dic=None, dev_list=None, path=None, net_mode='local'): - ''' + """ :param path: 运行路径 :param dev_list: 共享内存 :param dev_dic: 共享内存 :param logger: logger :param net_mode: 网络模式 # local / ip - ''' + """ # do father class __init__() mp.Process.__init__(self) # logging @@ -71,9 +71,6 @@ class client(mp.Process, pyglet.window.Window): # net_mode if self.net_mode == 'local': pass - # net_mode != 'local' and ,can is a ipv4 ip - # elif re.match(self.ipv4_re, self.net_mode): - # pass # textures self.textures = {} # parts diff --git a/bin/main.py b/bin/main.py index 6b36314..f548922 100644 --- a/bin/main.py +++ b/bin/main.py @@ -56,14 +56,21 @@ class Game: self.main_logger = logging.getLogger().getChild('main') self.server_logger = logging.getLogger().getChild('server') self.client_logger = logging.getLogger().getChild('client') - self.main_logger.info('client logger and server logger done') - + self.main_logger.info('loggers created') + self.main_logger.info('main logger setup done') + self.log_log_config() # version check self.python_version_check() # client and server self.client = client.client(self.client_logger, self.dicts, self.lists, net_mode='local') self.server = server.server(self.lists, self.dicts, self.server_logger, net_mode='local') - # //todo log configs + + def log_log_config(self): + self.main_logger.info('game start setup at %s' % self.start_time) + self.main_logger.debug('log file name: %s' % self.log_filename) + self.main_logger.debug('log file level: %s' % self.log_config['level']) + self.main_logger.debug('log file format: %s' % self.log_config['fmt']) + self.main_logger.debug('log file date format: %s' % self.log_config['date_fmt']) def python_version_check(self) -> None: self.main_logger.info('Difficult Rocket is running on Python Vision %s' % self.on_python_v) diff --git a/sys_value/basic_config.json5 b/sys_value/basic_config.json5 index 9bea746..a9a8116 100644 --- a/sys_value/basic_config.json5 +++ b/sys_value/basic_config.json5 @@ -26,8 +26,6 @@ ] ] }, - 'defaut ship': - [ - + 'default ship': [ ] } \ No newline at end of file diff --git a/sys_value/parts.json5 b/sys_value/parts.json5 index 199c896..822635e 100644 --- a/sys_value/parts.json5 +++ b/sys_value/parts.json5 @@ -14,7 +14,7 @@ 'bool', // hidden in part list 'bool', - // hidden in misson (even thought that is not done yet) + // hidden in mission (even thought that is not done yet) 'float' // buoyancy(浮力) in the water ],