refactor: remove the use of logging module in most code

This commit is contained in:
yusing
2025-05-23 23:28:33 +08:00
parent 20a1649275
commit 63c4bdc73d
51 changed files with 194 additions and 203 deletions

View File

@@ -4,7 +4,7 @@ import (
"errors"
"os"
"github.com/yusing/go-proxy/internal/logging"
"github.com/rs/zerolog/log"
"github.com/yusing/go-proxy/internal/utils/strutils"
)
@@ -13,14 +13,14 @@ func (p *Provider) Setup() (err error) {
if !errors.Is(err, os.ErrNotExist) { // ignore if cert doesn't exist
return err
}
logging.Debug().Msg("obtaining cert due to error loading cert")
log.Debug().Msg("obtaining cert due to error loading cert")
if err = p.ObtainCert(); err != nil {
return err
}
}
for _, expiry := range p.GetExpiries() {
logging.Info().Msg("certificate expire on " + strutils.FormatTime(expiry))
log.Info().Msg("certificate expire on " + strutils.FormatTime(expiry))
break
}