mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Create config directory before setting up logging to file under it
- The logging to file code expects the config directory to already be setup - But parent directory of config file was being set up later in code - This resulted in app start failing with ~/.khoj dir does not exist error
This commit is contained in:
parent
79894efc7a
commit
3ddffdfba4
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ def run():
|
|||
args = cli(state.cli_args)
|
||||
set_state(args)
|
||||
|
||||
# Create app directory, if it doesn't exist
|
||||
state.config_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Setup Logger
|
||||
if args.verbose == 0:
|
||||
logger.setLevel(logging.WARN)
|
||||
|
|
Loading…
Reference in a new issue