Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for LogOnceIf (0.19 sec)

  1. cmd/logging.go

    }
    
    // KMSLogger permits access to kms module specific logging
    type KMSLogger struct{}
    
    // LogOnceIf is the implementation of LogOnceIf, accessible using the Logger interface
    func (l KMSLogger) LogOnceIf(ctx context.Context, err error, id string, errKind ...interface{}) {
    	logger.LogOnceIf(ctx, "kms", err, id, errKind...)
    }
    
    // LogIf is the implementation of LogIf, accessible using the Logger interface
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. internal/logger/logonce.go

    	return l
    }
    
    var logOnce = newLogOnceType()
    
    // LogOnceIf - Logs notification errors - once per error.
    // id is a unique identifier for related log messages, refer to cmd/notification.go
    // on how it is used.
    func LogOnceIf(ctx context.Context, subsystem string, err error, id string, errKind ...interface{}) {
    	if logIgnoreError(err) {
    		return
    	}
    	logOnce.logOnceIf(ctx, subsystem, err, id, errKind...)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. internal/config/lambda/parse.go

    	"github.com/minio/minio/internal/logger"
    	"github.com/minio/pkg/v2/env"
    	xnet "github.com/minio/pkg/v2/net"
    )
    
    const (
    	logSubsys = "notify"
    )
    
    func logOnceIf(ctx context.Context, err error, id string, errKind ...interface{}) {
    	logger.LogOnceIf(ctx, logSubsys, err, id, errKind...)
    }
    
    // ErrTargetsOffline - Indicates single/multiple target failures.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. internal/kms/kes.go

    	cacheDuration, err := env.GetDuration(EnvKESKeyCacheInterval, defaultCacheDuration)
    	if err != nil {
    		logger.LogOnceIf(ctx, fmt.Errorf("%s, using default of 10s", err.Error()), "refresh-kms-master-key")
    		cacheDuration = defaultCacheDuration
    	}
    	if cacheDuration < time.Second {
    		logger.LogOnceIf(ctx, errors.New("cache duration is less than 1s, using default of 10s"), "refresh-kms-master-key")
    		cacheDuration = defaultCacheDuration
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  5. internal/config/notify/parse.go

    	"github.com/minio/pkg/v2/env"
    	xnet "github.com/minio/pkg/v2/net"
    )
    
    const (
    	formatNamespace = "namespace"
    )
    
    const (
    	logSubsys = "notify"
    )
    
    func logOnceIf(ctx context.Context, err error, id string, errKind ...interface{}) {
    	logger.LogOnceIf(ctx, logSubsys, err, id, errKind...)
    }
    
    // ErrTargetsOffline - Indicates single/multiple target failures.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 46.4K bytes
    - Viewed (0)
  6. internal/logger/target/http/http.go

    	QueueSize  int               `json:"queueSize"`
    	QueueDir   string            `json:"queueDir"`
    	Proxy      string            `json:"string"`
    	Transport  http.RoundTripper `json:"-"`
    
    	// Custom logger
    	LogOnceIf func(ctx context.Context, err error, id string, errKind ...interface{}) `json:"-"`
    }
    
    // Target implements logger.Target and sends the json
    // format of a log entry to the configured http endpoint.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  7. internal/rest/client.go

    	if err != nil {
    		if xnet.IsNetworkOrHostDown(err, expectTimeouts) {
    			if !c.NoMetrics {
    				atomic.AddUint64(&globalStats.errs, 1)
    			}
    			if c.MarkOffline(err) {
    				logger.LogOnceIf(ctx, logSubsys, fmt.Errorf("Marking %s offline temporarily; caused by %w", c.url.Host, err), c.url.Host)
    			}
    		}
    		return nil, &NetworkError{err}
    	}
    
    	// If trace is enabled, dump http request and response,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  8. internal/event/targetlist.go

    			if err := target.Save(event); err != nil {
    				list.eventsErrorsTotal.Add(1)
    				list.incFailedEvents(id)
    				reqInfo := &logger.ReqInfo{}
    				reqInfo.AppendTags("targetID", id.String())
    				logger.LogOnceIf(logger.SetReqInfo(context.Background(), reqInfo), logSubsys, err, id.String())
    			}
    		}(id, target)
    	}
    	wg.Wait()
    	list.totalEvents.Add(1)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  9. internal/logger/audit.go

    		if auditEntry != nil {
    			entry = *auditEntry
    		}
    	}
    
    	// Send audit logs only to http targets.
    	for _, t := range auditTgts {
    		if err := t.Send(ctx, entry); err != nil {
    			LogOnceIf(ctx, "logging", fmt.Errorf("Unable to send an audit event to the target `%v`: %v", t, err), "send-audit-event-failure")
    		}
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  10. internal/logger/config.go

    			endpoint := getCfgVal(legacyEnvLoggerHTTPEndpoint, target, "")
    			if endpoint == "" {
    				continue
    			}
    			url, err := xnet.ParseHTTPURL(endpoint)
    			if err != nil {
    				LogOnceIf(ctx, "logging", err, "logger-webhook-"+endpoint)
    				continue
    			}
    			cfg.HTTP[target] = http.Config{
    				Enabled:  true,
    				Endpoint: url,
    			}
    		}
    
    	case config.AuditWebhookSubSys:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.8K bytes
    - Viewed (0)
Back to top