|
39 | 39 |
|
40 | 40 | import os
|
41 | 41 |
|
| 42 | + |
42 | 43 | from chirptext import confirm, TextReport, Timer
|
43 | 44 | from chirptext.cli import CLIApp, setup_logging
|
44 | 45 |
|
|
54 | 55 | JMD_XML = config.get_file('JMDICT_XML')
|
55 | 56 | KD2_XML = config.get_file('KD2_XML')
|
56 | 57 | JMD_DB = config.get_file('JAMDICT_DB')
|
57 |
| -setup_logging('logging.json', 'logs') |
| 58 | + |
| 59 | +if os.path.isfile('logging.json'): |
| 60 | + setup_logging('logging.json', 'logs') |
| 61 | +else: |
| 62 | + setup_logging(os.path.join(config.home_dir(), 'logging.json'), 'logs') |
58 | 63 |
|
59 | 64 |
|
60 | 65 | # -------------------------------------------------------------------------------
|
@@ -152,7 +157,7 @@ def file_status(file_path):
|
152 | 157 | def show_info(cli, args):
|
153 | 158 | ''' Show jamdict configuration (data folder, configuration file location, etc.) '''
|
154 | 159 | output = TextReport(args.output) if 'output' in args else TextReport()
|
155 |
| - output.header("Jamdict | {} - Version: {}".format(version_info.__description__, version_info.__version_long__), level='h0') |
| 160 | + output.header("Jamdict | {} - Version: {}".format(version_info.__description__, version_info.__version__), level='h0') |
156 | 161 | output.header("Basic configuration")
|
157 | 162 | output.print("JAMDICT_HOME: {}".format(config.home_dir()))
|
158 | 163 | output.print("Configuration location: {}".format(config._get_config_manager().locate_config()))
|
|
0 commit comments