[VOL-2356]core log_level command line argument should take log level names not int value
- StringToLogLevel method returns two arguments.
Change-Id: I83d20d645fa63363e71265b163273414f14688a7
diff --git a/adaptercore/error.go b/adaptercore/error.go
index b696529..74bd296 100644
--- a/adaptercore/error.go
+++ b/adaptercore/error.go
@@ -51,7 +51,7 @@
type LoggableError interface {
error
Log() error
- LogAt(int) error
+ LogAt(log.LogLevel) error
}
// ErrAdapter represents a basic adapter error that combines an name, field set
@@ -110,7 +110,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrAdapter) LogAt(level int) error {
+func (e *ErrAdapter) LogAt(level log.LogLevel) error {
logger := log.Debugw
switch level {
case log.InfoLevel:
@@ -154,7 +154,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrInvalidValue) LogAt(level int) error {
+func (e *ErrInvalidValue) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}
@@ -183,7 +183,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrNotFound) LogAt(level int) error {
+func (e *ErrNotFound) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}
@@ -215,7 +215,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrPersistence) LogAt(level int) error {
+func (e *ErrPersistence) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}
@@ -245,7 +245,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrCommunication) LogAt(level int) error {
+func (e *ErrCommunication) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}
@@ -276,7 +276,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrFlowOp) LogAt(level int) error {
+func (e *ErrFlowOp) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}
@@ -305,7 +305,7 @@
}
// LogAt logs the error at the specified level and then returns the error
-func (e *ErrTimeout) LogAt(level int) error {
+func (e *ErrTimeout) LogAt(level log.LogLevel) error {
_ = e.ErrAdapter.LogAt(level)
return e
}