Skip to content

Commit

Permalink
fix: make sure app workdir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Feb 1, 2024
1 parent 0dfe451 commit 77d19b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func NewService(ctx context.Context) (*Service, error) {
logger.SetOutput(os.Stdout)
logger.SetLevel(log.InfoLevel)

// make sure workdir exists
os.MkdirAll(appConfig.Workdir, os.ModePerm)

fileLoggerHook, err := lumberjackrus.NewHook(
&lumberjackrus.LogFile{
Filename: path.Join(appConfig.Workdir, "log/nwc-general.log"),
Expand Down

0 comments on commit 77d19b7

Please sign in to comment.