Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Configure log level and where logs are stored #4476

Closed
senovr opened this issue Jan 14, 2025 · 2 comments
Closed

[Question]: Configure log level and where logs are stored #4476

senovr opened this issue Jan 14, 2025 · 2 comments
Labels
question Further information is requested

Comments

@senovr
Copy link

senovr commented Jan 14, 2025

Describe your problem

Gents,
I have a rather general question about logging and log level.

  1. Where the logs are stored in each of the containers? I may want to adjust volumes mounting, to keep these logs during containers running.

  2. Logs level.
    I read through .env file (specificaly, this section), but still dont get how exactly I should format the section to set log level to debug in each container.

  3. What is possible to log and what is not?
    For example, can I log that the user A logged into a system, and talked with knowledge base B using agent C or LLM D ?
    Or - how often user A logs into the system? Or- what are the most "popular" knowledge bases users interact with?
    Or I can get just "technical" logs from each of the containers?

Thank you in advance

@senovr senovr added the question Further information is requested label Jan 14, 2025
@yuzhichang
Copy link
Member

yuzhichang commented Jan 15, 2025

Describe your problem

Gents, I have a rather general question about logging and log level.

  1. Where the logs are stored in each of the containers? I may want to adjust volumes mounting, to keep these logs during containers running.

RAGFlow container Logs is a volume mounted from local directory in docker/docker-compose.yml:

    volumes:
      - ./ragflow-logs:/ragflow/logs

Other containers logs are printed to container console, and out of control of us.

  1. Logs level.
    I read through .env file (specificaly, this section), but still dont get how exactly I should format the section to set log level to debug in each container.
  2. What is possible to log and what is not?
    For example, can I log that the user A logged into a system, and talked with knowledge base B using agent C or LLM D ?
    Or - how often user A logs into the system? Or- what are the most "popular" knowledge bases users interact with?
    Or I can get just "technical" logs from each of the containers?

You need to change code to add logging.info(...) where you need to log and rebuild RAGFlow image. Those info don't occur magically.

Thank you in advance

@senovr
Copy link
Author

senovr commented Jan 16, 2025

@yuzhichang

Ok, thanks for clarification.
Can you please give more info on how to configure this section of .env file:

# The log level for the RAGFlow's owned packages and imported packages.
# Available level:
# - `DEBUG`
# - `INFO` (default)
# - `WARNING`
# - `ERROR`
# For example, following line changes the log level of `ragflow.es_conn` to `DEBUG`:
# LOG_LEVELS=ragflow.es_conn=DEBUG

if I want to set log level of ragflow to DEBUG, am I need to just put:
LOG_LEVELS=DEBUG
or I need to do something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants