Skip to content

Commit 28f17ff

Browse files
vgramermjuraga
authored andcommitted
BUG/MINOR: configuration: fix missing logs during configuration loading
the logger is not initalized yet, so warnning messages were lost Signed-off-by: Vincent Gramer <[email protected]>
1 parent 9bc95ee commit 28f17ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configuration/configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func (c *Configuration) Load() error {
210210
c.storage = &StorageYML{}
211211
if err = c.storage.Load(c.HAProxy.DataplaneConfig); err != nil {
212212
if errors.Is(err, fs.ErrNotExist) {
213-
log.Warningf("configuration file %s does not exists, creating one", c.HAProxy.DataplaneConfig)
213+
fmt.Printf("configuration file %s does not exists, creating one\n", c.HAProxy.DataplaneConfig)
214214
} else {
215215
return fmt.Errorf("configuration file %s not valid (only yaml format is supported): %w", c.HAProxy.DataplaneConfig, err)
216216
}
@@ -229,7 +229,7 @@ func (c *Configuration) Load() error {
229229
if c.Name.Load() == "" {
230230
hostname, nameErr := os.Hostname()
231231
if nameErr != nil {
232-
log.Warningf("Error fetching hostname, using petname for dataplaneapi name: %s", nameErr.Error())
232+
fmt.Printf("Error fetching hostname, using petname for dataplaneapi name: %s\n", nameErr.Error())
233233
c.Name.Store(petname.Generate(2, "_"))
234234
}
235235
c.Name.Store(hostname)

0 commit comments

Comments
 (0)