## set log config in env.yml ```yaml log: level: info # specify the log level (error/warning/info/debug), default: info file: out.log # specify the log file, default logs to standard output splitTag: 20060102 # log file split format, refer to Golang date time format syntax, default does not split sensitive: phone,password,secret,token,accessToken # fields to be desensitized in logs, separated by commas. The matching values in requests, responses, HTTP headers, and request/response JSON data indices will be desensitized ``` ## set log config in env for docker ```shell docker run -e LOG_LEVEL=info -e LOG_FILE=/var/log/app.log -e LOG_SPLIT_TAG=20060102 ... ``` ## example ```javascript import log from 'log' log.info('hello world') log.error('some error', {name: 'abc'}) ```