Find answers from the community

Updated 2 years ago

Logs

At a glance

The community member posted about getting logs in a new version of a library called "mycolabs-langchain". They asked if they need to enable "LlamaLogger" in the service context. In the comments, other community members discussed the missing logs, suggesting that the default logging level may have been raised and needs to be set back to "info", or that the logs may have moved to the "debug" level. One community member provided a code snippet to set the logging level to "info" and add a stream handler to the logger. However, there is no explicitly marked answer to the original question.

to get these logs in new version:
Plain Text
[mycolabs-langchain] [2023-05-08 23:06:28] INFO:root:> [query] Total embedding token usage: 0 tokens

do I need to enable LlamaLogger in service context?
L
b
5 comments
I've noticed these are missing too... not related to llama logger though I think

Maybe the default logging level was raised, and we need to put it back to info? Or maybe those moved to debug? I'll take a look in a bit
Plain Text
import sys

logging.basicConfig(stream=sys.stdout, level=logging.INFO)

logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
I added that last night when i asked the question
saw it in the docs
didn't get a chance to test it yet though
Add a reply
Sign up and join the conversation on Discord