feat : add setup_logging with hierarchical astrai logger
- setup_logging(): attach handler only to astrai logger, not root - all astrai.* sub-module loggers inherit automatically - controlled by ASTR_LOG_LEVEL env var (default INFO) - called in if __name__ == '__main__' of each CLI script
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import click
|
||||
|
||||
from astrai import setup_logging
|
||||
from astrai.config.preprocess_config import PipelineConfig
|
||||
from astrai.preprocessing.pipeline import Pipeline
|
||||
|
||||
@@ -47,4 +48,5 @@ def preprocess_command(inputs, output_dir, pipeline_config, tokenizer_path, batc
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup_logging()
|
||||
preprocess_command()
|
||||
|
||||
Reference in New Issue
Block a user