I am following below url for logging driver
https://docs.docker.com/engine/admin/logging/overview/#configure-the-default-logging-driver
now, I want to remove this logging driver
I have remove file(daemon.json) from /etc/docker folder too.
But when I build container, system should always showing me warning
WARNING: no logs are available with the 'none' log driver
How can I get rid of this warning?
To configure the Docker daemon to default to a specific logging driver, set the value of log-driver to the name of the logging driver in the daemon. json configuration file. Refer to the “daemon configuration file” section in the dockerd reference manual for details.
To use the json-file driver as the default logging driver, set the log-driver and log-opts keys to appropriate values in the daemon. json file, which is located in /etc/docker/ on Linux hosts or C:\ProgramData\docker\config\ on Windows Server. If the file does not exist, create it first.
To get rid of the warning WARNING: no logs are available with the 'none' log driver you should comment or remove those 2 lines. Show activity on this post. By default /etc/docker/daemon.json does not exist. The default driver is json-file. To verify current driver use
Finally solved. 1) Delete daemon.json file from /etc/docker folder. 2) Restart docker service. Show activity on this post. My case. To get rid of the warning WARNING: no logs are available with the 'none' log driver you should comment or remove those 2 lines.
To find the current logging driver for a running container, if the daemon is using the json-file logging driver, run the following docker inspect command, substituting the container name or ID for <CONTAINER>: Docker provides two modes for delivering messages from the container to the log driver:
@tam481: no, the docker log loki driver works fine, it is just that since it is sitting on the host network, it does not have automatic access to the loki container running within a docker-compose project.
Finally solved.
1) Delete daemon.json
file from /etc/docker
folder.
2) Restart docker service.
My case.
In file docker-compose.yml
it is very possible that you have:
logging:
driver: none
To get rid of the warning WARNING: no logs are available with the 'none' log driver
you should comment or remove those 2 lines.
By default /etc/docker/daemon.json
does not exist. The default driver is json-file. To verify current driver use
docker info | grep Logging
Logging Driver: fluentd
I use fluentd (td-agent) so my /etc/docker/daemon.json
{
"log-driver": "fluentd",
"log-opts": {
"fluentd-address": "127.0.0.1:24224"
}
}
For details about logging, divers see https://docs.docker.com/config/containers/logging/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With