mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Fix timestamps to separate each logline. Info log response start time
This commit is contained in:
parent
667b975400
commit
70f74cde68
2 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ from khoj.utils.initialization import initialization
|
|||
|
||||
# Setup Logger
|
||||
rich_handler = RichHandler(rich_tracebacks=True)
|
||||
rich_handler.setFormatter(fmt=logging.Formatter(fmt="%(message)s", datefmt="[%X]"))
|
||||
rich_handler.setFormatter(fmt=logging.Formatter(fmt="%(message)s", datefmt="[%H:%M:%S.%f]"))
|
||||
logging.basicConfig(handlers=[rich_handler])
|
||||
|
||||
logger = logging.getLogger("khoj")
|
||||
|
|
|
@ -56,7 +56,7 @@ class ThreadedGenerator:
|
|||
def send(self, data):
|
||||
if self.response == "":
|
||||
time_to_first_response = perf_counter() - self.start_time
|
||||
logger.debug(f"First response took: {time_to_first_response:.3f} seconds")
|
||||
logger.info(f"First response took: {time_to_first_response:.3f} seconds")
|
||||
|
||||
self.response += data
|
||||
self.queue.put(data)
|
||||
|
|
Loading…
Add table
Reference in a new issue