file.go 392 B

12345678910111213141516171819
  1. package logging
  2. import (
  3. "fmt"
  4. "lttc-go-adm-znaf/pkg/setting"
  5. "time"
  6. )
  7. func getLogFilePath() string {
  8. return fmt.Sprintf("%s%s", setting.AppSetting.RuntimeRootPath, setting.AppSetting.LogSavePath)
  9. }
  10. func getLogFileName() string {
  11. return fmt.Sprintf("%s%s.%s",
  12. setting.AppSetting.LogSaveName,
  13. time.Now().Format(setting.AppSetting.TimeFormat),
  14. setting.AppSetting.LogFileExt,
  15. )
  16. }