Skip to content

Cron job finish log shows raw format string instead of formatted duration #3145

@thzgajendra

Description

@thzgajendra

Description

When a cron job finishes, the log message shows the duration with a raw Go format string instead of a properly formatted value:

INFO [13:47:40] Finished cron job: gcp-db-migration in %!s(float64=0.000134084)

Expected output should be something like:

INFO [13:47:40] Finished cron job: gcp-db-migration in 0.000134s

Root Cause

The log line is likely using %s format verb for a float64 duration value, which produces the %!s(float64=...) output. It should use %f, %v, or format it as a time.Duration string.

Steps to Reproduce

  1. Register any cron job with app.AddCronJob(...)
  2. Let it execute
  3. Observe the "Finished cron job" log line — duration is displayed as %!s(float64=X.XXX)

GoFr Version

v1.54.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions