Go to file
2024-10-12 16:55:50 +08:00
.gitignore 1 2024-10-11 10:52:22 +08:00
go.mod 1 2024-10-11 10:52:22 +08:00
LICENSE 1 2024-10-11 10:52:22 +08:00
log_test.go 1 2024-10-11 10:52:22 +08:00
log.go 1 2024-10-11 10:52:22 +08:00
log.ts 1 2024-10-11 10:52:22 +08:00
README.md update README 2024-10-12 16:55:50 +08:00

log for GoJS

set log config in env.yml

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

more config see ssgo/log

example

import log from 'apigo.cc/gojs/log'
log.info('hello world')
log.error('some error', {name: 'abc'})

module.exports

function debug(message:string, info?:Object): void {}
function info(message:string, info?:Object): void {}
function warn(message:string, info?:Object): void {}
function error(message:string, info?:Object): void {}

full api see log.ts