Skip to content

Commit

Permalink
general: remove custom logger
Browse files Browse the repository at this point in the history
It seems like it does not really make logs appear more readable
unfortunately, especially in docker environment. We may want to switch
to a different structured logging instead.

See #50
  • Loading branch information
daniel-abramov committed Dec 5, 2022
1 parent 877f7c2 commit e2d73f9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 78 deletions.
74 changes: 0 additions & 74 deletions pkg/logger.go

This file was deleted.

3 changes: 1 addition & 2 deletions pkg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ import (
func main() {
// Parse command line flags.
var (
logTime = flag.Bool("logTime", false, "whether or not to print time and date in logs")
configFilePath = flag.String("config", "config.yaml", "configuration file path")
cpuProfile = flag.String("cpuProfile", "", "write CPU profile to `file`")
memProfile = flag.String("memProfile", "", "write memory profile to `file`")
)
flag.Parse()

// Initialize logging subsystem (formatting, global logging framework etc).
InitLogging(*logTime)
logrus.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})

// Define functions that are called before exiting.
// This is useful to stop the profiler if it's enabled.
Expand Down
2 changes: 1 addition & 1 deletion scripts/profile.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

go run ./pkg/*.go --cpuProfile cpuProfile.pprof --memProfile memProfile.pprof --logTime
go run ./pkg/*.go --cpuProfile cpuProfile.pprof --memProfile memProfile.pprof
2 changes: 1 addition & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

go run ./pkg --logTime
go run ./pkg

0 comments on commit e2d73f9

Please sign in to comment.