Skip to content

Commit

Permalink
Improve logging on railway.app.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Jul 2, 2024
1 parent 1dad9cd commit bc1e3e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/service/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func provideLogger(cfg *config.Config) (*zap.Logger, error) {
var options []zap.Option
switch cfg.Logging.Backend {
case "":
zapCfg = zap.NewDevelopmentConfig()
zapCfg.Level = zap.NewAtomicLevelAt(zap.DebugLevel)
case "humio":
// Nothing, use production out of the box.
default:
Expand Down
2 changes: 2 additions & 0 deletions pkg/toitdoc/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (g *generator) generateDocs(ctx context.Context, projectPath string, desc *
)
cmd.Dir = projectPath

g.logger.Debug("generating toitdocs", zap.String("cwd", projectPath), zap.String("cmd", cmd.String()), zap.String("url", desc.URL), zap.String("version", desc.Version))
if err := cmd.Run(); err != nil {
var stdout string
if exitErr, ok := err.(*exec.ExitError); ok {
Expand All @@ -47,5 +48,6 @@ func (g *generator) generateDocs(ctx context.Context, projectPath string, desc *
return err
}

g.logger.Debug("generated toitdocs", zap.String("cwd", projectPath), zap.String("cmd", cmd.String()), zap.String("url", desc.URL), zap.String("version", desc.Version))
return nil
}

0 comments on commit bc1e3e5

Please sign in to comment.