1234567891011121314151617181920212223242526272829303132333435 |
- package cfg
- import (
- "fmt"
- "path/filepath"
- ucfg "git.wecise.com/wecise/util/cfg"
- ulog "git.wecise.com/wecise/util/logger"
- )
- var Config = ucfg.MConfig(&ucfg.CfgOption{
- Name: "m:default",
- Type: ucfg.INI_TEXT,
- Values: []string{`
- [log]
- level=debug
- dir=` + filepath.Join("/", "opt", "matrix", "var", "logs") + `
- file=` + "cgimport.log" + `
- console=true
- color=true
- consolelevel=info
- format=yyyy-MM-dd HH:mm:ss.SSSSSS [pid] [level] module/file:line msg
- eol=\n
- size=10MB
- count=100
- scroll=1d
- expire=14d
- `}},
- ucfg.GetIniFileCfgOption(filepath.Join(fmt.Sprint("cgimport", ".conf"))),
- ucfg.GetIniFileCfgOption(filepath.Join(fmt.Sprint(ucfg.DefaultAppName, ".conf"))),
- ucfg.CFGOPTION_ENVS,
- ucfg.CFGOPTION_ARGS)
- var Logger = ulog.New().WithConfig(Config, "log")
- var LogFile = Logger.FileOutPath()
|