Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmonsays committed Jan 23, 2016
1 parent 64eb99b commit f81401c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/runitcmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func main() {
continue
}

log.Tracef("Loading %s", config_file)
err = app.Conf.LoadYaml(config_file)
if err != nil {
log.Warnf("load %s: %s", config_file, err)
Expand Down
2 changes: 2 additions & 0 deletions runit/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ func (runit *Runit) Apply(cfg *ServiceConfig) error {
f.Chmod(0755)
f.Close()

log.Tracef("run exec %s", cfg.Exec)

// write the log/run file
logrun := filepath.Join(sv.ServiceDir, "log/run")

Expand Down
2 changes: 2 additions & 0 deletions runit/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func (cfg *LoggingConfig) WriteRunFile(path string) error {
fmt.Fprintf(f, "#!/bin/bash\n")
fmt.Fprintf(f, "exec svlogd %s %s\n", svlogd_flags, cfg.Directory)

log.Tracef("log/run svlogd %s %s", svlogd_flags, cfg.Directory)

err = os.MkdirAll(cfg.Directory, 0755)
if err != nil {
return err
Expand Down

0 comments on commit f81401c

Please sign in to comment.