Skip to content

Commit 51a9dc1

Browse files
authored
Merge pull request #80 from systemli/Change-log-level-from-Info-to-Debug-for-alias-and-domain-processing-errors
🔇 Change log level from Info to Debug for alias and domain processing…
2 parents 110022c + bb7b25f commit 51a9dc1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

userli.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func NewUserli(token, baseURL string, opts ...Option) *Userli {
137137
func (u *Userli) GetAliases(ctx context.Context, email string) ([]string, error) {
138138
sanitizedEmail, err := u.sanitizeEmail(email)
139139
if err != nil {
140-
logger.Info("unable to process the alias", zap.String("email", email), zap.Error(err))
140+
logger.Debug("unable to process the alias", zap.String("email", email), zap.Error(err))
141141
return []string{}, nil
142142
}
143143

@@ -159,7 +159,7 @@ func (u *Userli) GetAliases(ctx context.Context, email string) ([]string, error)
159159
func (u *Userli) GetDomain(ctx context.Context, domain string) (bool, error) {
160160
resp, err := u.call(ctx, fmt.Sprintf("%s/api/postfix/domain/%s", u.baseURL, domain))
161161
if err != nil {
162-
logger.Info("unable to process the domain", zap.String("domain", domain), zap.Error(err))
162+
logger.Debug("unable to process the domain", zap.String("domain", domain), zap.Error(err))
163163
return false, err
164164
}
165165
defer resp.Body.Close()
@@ -176,7 +176,7 @@ func (u *Userli) GetDomain(ctx context.Context, domain string) (bool, error) {
176176
func (u *Userli) GetMailbox(ctx context.Context, email string) (bool, error) {
177177
sanitizedEmail, err := u.sanitizeEmail(email)
178178
if err != nil {
179-
logger.Info("unable to process the mailbox", zap.String("email", email), zap.Error(err))
179+
logger.Debug("unable to process the mailbox", zap.String("email", email), zap.Error(err))
180180
return false, nil
181181
}
182182

@@ -198,7 +198,7 @@ func (u *Userli) GetMailbox(ctx context.Context, email string) (bool, error) {
198198
func (u *Userli) GetSenders(ctx context.Context, email string) ([]string, error) {
199199
sanitizedEmail, err := u.sanitizeEmail(email)
200200
if err != nil {
201-
logger.Info("unable to process the senders", zap.String("email", email), zap.Error(err))
201+
logger.Debug("unable to process the senders", zap.String("email", email), zap.Error(err))
202202
return []string{}, nil
203203
}
204204

@@ -220,7 +220,7 @@ func (u *Userli) GetSenders(ctx context.Context, email string) ([]string, error)
220220
func (u *Userli) GetQuota(ctx context.Context, email string) (*Quota, error) {
221221
sanitizedEmail, err := u.sanitizeEmail(email)
222222
if err != nil {
223-
logger.Info("unable to process the quota", zap.String("email", email), zap.Error(err))
223+
logger.Debug("unable to process the quota", zap.String("email", email), zap.Error(err))
224224
return nil, err
225225
}
226226

0 commit comments

Comments
 (0)