Cant't find server log file in /var/log/grafana/

i can’t find my local server log file in default dir /var/log/grafana ,i use grafana8.5.3 on docker ,
image

Hi @thermallife,

Welcome to the :grafana: community forum !!

You can find the grafana logs using the command;

docker logs container-name

Where,

container-name

is the name you name for e.g. grafana or maybe used grafana8 etc.

Further information which I found via;

When running grafana via docker image the logs by defaults output to the console.

You can change that by setting the environment variable GF_LOG_MODE to console file if you want the logs to be written to both, the console and a file. Set it to file otherwise. This works for docker-compose.yml, docker run or can be set at a later point of time from within the grafana-container by editing its grafana.ini

Additionally: You might have to set the environment variable GF_LOG_LEVEL in addition to GF_LOG_MODE as your container might crash otherwise: GF_LOG_LEVEL=info

The different log modes to choose from can be found in Grafana’s precise documentation