You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
589 B

3 years ago
2 years ago
3 years ago
2 years ago
  1. package log
  2. type LogCfg struct {
  3. LogConf string `toml:"conf"`
  4. LogPath string `toml:"path"`
  5. LogInfoPath string `toml:"path_info"`
  6. LogErrPath string `toml:"path_err"`
  7. APPName string `toml:"app_name"`
  8. DInfo string
  9. DError string
  10. OutputPaths string
  11. ErrorOutputPaths string
  12. }
  13. type GlobalCfg struct {
  14. Logs LogCfg `toml:"logger"`
  15. }
  16. const (
  17. // ConfigFile is the default configuration file name.
  18. ConfigFile = "./conf/cfg.toml"
  19. )
  20. func New(infoPath, errPath string) LogCfg {
  21. return LogCfg{
  22. LogInfoPath: infoPath,
  23. LogErrPath: errPath,
  24. }
  25. }