diff --git a/VirtualHavruta/util.py b/VirtualHavruta/util.py index d277b5f..19b17df 100644 --- a/VirtualHavruta/util.py +++ b/VirtualHavruta/util.py @@ -1,18 +1,18 @@ +import sys import logging -from logging import handlers from typing import Iterable from VirtualHavruta.document import ChunkDocument from langchain_core.documents import Document -def create_logger(f='virtual-havruta.log', name='virtual-havruta', mb=1*1024*1024, bk=0): +def create_logger(name='virtual-havruta'): logger = logging.getLogger(name) logger.setLevel(logging.INFO) - file_handler = logging.handlers.RotatingFileHandler(f, mode='a', maxBytes=mb, backupCount=bk, encoding=None, delay=0) + stdout_handler = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('%(asctime)s : %(levelname)s : %(name)s : %(message)s') - file_handler.setFormatter(formatter) - logger.addHandler(file_handler) + stdout_handler.setFormatter(formatter) + logger.addHandler(stdout_handler) return logger def part_res(input_res, sep=''): diff --git a/config.yaml b/config.yaml index e7017ec..138c346 100644 --- a/config.yaml +++ b/config.yaml @@ -17,7 +17,6 @@ database: name: db_name neo4j_deeplink: http://neodash.graphapp.io/xyz - # Slack-related parameters slack: slack_bot_token: slack_bot_token @@ -39,10 +38,6 @@ llm_chain_setups: support_model: ['chain4', 'chain5', 'chain6'] support_model_json: [] -# File paths -files: - log_path: ./data/virtual-havruta.log - # Reference Settings references: primary_source_filter: ['filter1', 'filter2', 'filter3']