1
0
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:
DarthSim 2024-10-02 23:25:46 +03:00
parent b0af7cb22a
commit 7f4c099027
3 changed files with 15 additions and 4 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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
}