Skip to content

Commit

Permalink
(feat) return a local time and log it
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Aug 8, 2024
1 parent 4bf1695 commit a77df24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ func watch(filePath string) {
}
slog.Info("Error count", "count", result.ErrorCount)

slog.Info("1st line", "line", pkg.Truncate(result.FirstLine, pkg.TruncateMax))
slog.Info("1st line", "date", result.FirstDate, "line", pkg.Truncate(result.FirstLine, pkg.TruncateMax))
slog.Info("Preview line", "line", pkg.Truncate(result.PreviewLine, pkg.TruncateMax))
slog.Info("Last line", "line", pkg.Truncate(result.LastLine, pkg.TruncateMax))
slog.Info("Last line", "date", result.LastDate, "line", pkg.Truncate(result.LastLine, pkg.TruncateMax))

slog.Info("Scanning complete", "filePath", result.FilePath)

Expand Down
2 changes: 1 addition & 1 deletion pkg/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ func SearchDate(input string) string {
if !ok {
return ""
}
return ts.String()
return ts.Format("2006-01-02 15:04:05")
}

0 comments on commit a77df24

Please sign in to comment.