log

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 5 Imported by: 1

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL