mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 05:39:11 +00: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:
@@ -63,6 +63,9 @@ def run():
|
|||||||
args = cli(state.cli_args)
|
args = cli(state.cli_args)
|
||||||
set_state(args)
|
set_state(args)
|
||||||
|
|
||||||
|
# Create app directory, if it doesn't exist
|
||||||
|
state.config_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
# Setup Logger
|
# Setup Logger
|
||||||
if args.verbose == 0:
|
if args.verbose == 0:
|
||||||
logger.setLevel(logging.WARN)
|
logger.setLevel(logging.WARN)
|
||||||
|
|||||||
Reference in New Issue
Block a user