Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Unified Diff: common/cloudlogging/severity.go

Issue 2937693003: Make luci-go compile again after deps.lock roll. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/cloudlogging/entry.go ('k') | common/logging/cloudlog/logging.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/cloudlogging/severity.go
diff --git a/common/cloudlogging/severity.go b/common/cloudlogging/severity.go
deleted file mode 100644
index 3b2119d6aed34f22f9910a543b93054522532e0b..0000000000000000000000000000000000000000
--- a/common/cloudlogging/severity.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package cloudlogging
-
-import (
- "errors"
- "strings"
-)
-
-// Severity defines how important a message is.
-type Severity string
-
-// All severity types understood by Cloud Logging.
-const (
- Default Severity = "DEFAULT"
- Debug Severity = "DEBUG"
- Info Severity = "INFO"
- Notice Severity = "NOTICE"
- Warning Severity = "WARNING"
- Error Severity = "ERROR"
- Critical Severity = "CRITICAL"
- Alert Severity = "ALERT"
- Emergency Severity = "EMERGENCY"
-)
-
-var knownSeverity = []Severity{
- Default,
- Debug,
- Info,
- Notice,
- Warning,
- Error,
- Critical,
- Alert,
- Emergency,
-}
-
-// Validate returns a error if the severity is not recognized.
-func (sev Severity) Validate() error {
- for _, k := range knownSeverity {
- if sev == k {
- return nil
- }
- }
- return errors.New("cloudlog: unknown severity")
-}
-
-// String is used by 'flag' package.
-func (sev Severity) String() string {
- return string(sev)
-}
-
-// Set is called by 'flag' package when parsing command line options.
-func (sev *Severity) Set(value string) error {
- val := Severity(strings.ToUpper(value))
- if err := val.Validate(); err != nil {
- return err
- }
- *sev = val
- return nil
-}
« no previous file with comments | « common/cloudlogging/entry.go ('k') | common/logging/cloudlog/logging.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698