Closed davywang closed 5 years ago
You can set the log level through the environment variable when creating the container,just like this
$ docker run -it -e EMQX_LOG__LEVEL=debug --rm emqx/emqx:v3.2.2
node.max_ports=1048576
listener.tcp.external.acceptors=64
log.level=debug
listener.ssl.external.acceptors=32
node.process_limit=2097152
node.max_ets_tables=2097152
listener.ws.external.acceptors=16
node.name=f881bd74eef0@172.17.0.2
emqx v3.2.1 is started successfully!
{mfargs,{prometheus_histogram,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
2019-08-06 02:51:58.793 [info] application: prometheus
started_at: 'f881bd74eef0@172.17.0.2'
2019-08-06 02:51:58.839 [info] application: luerl
started_at: 'f881bd74eef0@172.17.0.2'
2019-08-06 02:51:58.839 [info] application: xmerl
started_at: 'f881bd74eef0@172.17.0.2'
['2019-08-06T02:52:05Z']:emqx start
I set the log level through the environment variable when creating the container. It works! Thanks a lot,zhanghongtong.
Make sure you read and understand http://emqtt.io/docs/v2/index.html. Use one of the two templates below and delete the rest.
Expected behavior
Set log level to debug. See debug log of the emqx.
Actual behavior
Only see error log of the emqx(default). Setting is not affected.
Test code
The log severity level.
Value: debug | info | notice | warning | error | critical | alert | emergency
Note: Only the messages with severity level higher than or equal to
this level will be logged.
Default: error
log.level = debug
EMQ version
EMQX v3.1.2
Docker version
Docker version 18.09.4, build d14af54266
How docker info?
Containers: 3 Running: 2 Paused: 0 Stopped: 1 Images: 6 Server Version: 18.09.4 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84 runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30 init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 3.10.0-957.1.3.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 1.952GiB Name: wang002 ID: 2JUH:AX4Y:4DMO:G63N:3W77:FLTE:XN2L:SSYP:X46Z:YMTV:DXTP:FV7T Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine
System
Linux version 3.10.0-957.1.3.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 29 14:49:43 UTC 2018 CentOS Linux release 7.5.1804 (Core)
Hardware
How is the host machine?
baidu cloud vps cpu:4c mermory:4g