mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-18 16:31:44 +02:00
Fix loading log configs from local files and secret managers
This commit is contained in:
parent
b0af7cb22a
commit
7f4c099027
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
### Fix
|
||||
- Fix loading log configs from local files and secret managers.
|
||||
|
||||
## [3.26.0] - 2024-09-16
|
||||
# Add
|
||||
- Add `imgproxy.source_image_url` and `imgproxy.processing_options` attributes to New Relic, DataDog, and OpenTelemetry traces.
|
||||
|
@ -9,6 +9,13 @@ import (
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Configure logrus so it can be used before Init().
|
||||
// Structured formatter is a compromise between JSON and pretty formatters.
|
||||
logrus.SetOutput(os.Stdout)
|
||||
logrus.SetFormatter(&structuredFormatter{})
|
||||
}
|
||||
|
||||
func Init() error {
|
||||
logrus.SetOutput(os.Stdout)
|
||||
|
||||
|
8
main.go
8
main.go
@ -28,6 +28,10 @@ import (
|
||||
)
|
||||
|
||||
func initialize() error {
|
||||
if err := loadenv.Load(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := logger.Init(); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -36,10 +40,6 @@ func initialize() error {
|
||||
|
||||
maxprocs.Set(maxprocs.Logger(log.Debugf))
|
||||
|
||||
if err := loadenv.Load(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := config.Configure(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user