Browse code

api/types: hostconfig: fix LogMode enum

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/10/13 22:42:01
Showing 2 changed files
... ...
@@ -341,7 +341,7 @@ type LogMode string
341 341
 
342 342
 // Available logging modes
343 343
 const (
344
-	LogModeUnset            = ""
344
+	LogModeUnset    LogMode = ""
345 345
 	LogModeBlocking LogMode = "blocking"
346 346
 	LogModeNonBlock LogMode = "non-blocking"
347 347
 )
... ...
@@ -36,7 +36,7 @@ func WithLocalCache(l logger.Logger, info logger.Info) (logger.Logger, error) {
36 36
 		return nil, errors.Wrap(err, "error initializing local log cache driver")
37 37
 	}
38 38
 
39
-	if info.Config["mode"] == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock {
39
+	if container.LogMode(info.Config["mode"]) == container.LogModeUnset || container.LogMode(info.Config["mode"]) == container.LogModeNonBlock {
40 40
 		var size int64 = -1
41 41
 		if s, exists := info.Config["max-buffer-size"]; exists {
42 42
 			size, err = units.RAMInBytes(s)