Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: full standard timestamp with timezone (yyyy-mm-dd) #163

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests_deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:

- name: Install functional test dependencies
run: |
sudo apt update
sudo apt install -y build-essential debhelper devscripts fakeroot lintian
docker network create net-test
python3 -m pip install --upgrade pipenv wheel
Expand Down
3 changes: 2 additions & 1 deletion pkg/cfg/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"os"
"path/filepath"
"time"

log "github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/writer"
Expand Down Expand Up @@ -90,7 +91,7 @@ func (c *LoggingConfig) setup(fileName string) error {
return nil
}

log.SetFormatter(&log.TextFormatter{TimestampFormat: "02-01-2006 15:04:05", FullTimestamp: true})
log.SetFormatter(&log.TextFormatter{TimestampFormat: time.RFC3339, FullTimestamp: true})

logger, err := c.LoggerForFile(fileName)
if err != nil {
Expand Down
Loading