File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,13 @@ import (
18
18
)
19
19
20
20
const (
21
- version = "0.1.4 "
21
+ version = "1.0.5 "
22
22
shutdownTimeout = 10 * time .Second
23
23
)
24
24
25
25
func main () {
26
26
27
+ verbose := false
27
28
app := cli .NewApp ()
28
29
app .Name = "docker-zfs-plugin"
29
30
app .Usage = "Docker ZFS Plugin"
@@ -33,8 +34,19 @@ func main() {
33
34
Name : "dataset-name" ,
34
35
Usage : "Name of the ZFS dataset to be used. It will be created if it doesn't exist." ,
35
36
},
37
+ cli.BoolFlag {
38
+ Name : "verbose" ,
39
+ Usage : "verbose output" ,
40
+ Destination : & verbose ,
41
+ },
36
42
}
37
43
app .Action = Run
44
+ app .Before = func (c * cli.Context ) error {
45
+ if verbose {
46
+ log .SetLevel (log .DebugLevel )
47
+ }
48
+ return nil
49
+ }
38
50
err := app .Run (os .Args )
39
51
if err != nil {
40
52
panic (err )
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ type ZfsDriver struct {
17
17
18
18
//NewZfsDriver returns the plugin driver object
19
19
func NewZfsDriver (dss ... string ) (* ZfsDriver , error ) {
20
- log .SetLevel (log .DebugLevel )
21
20
log .Debug ("Creating new ZfsDriver." )
22
-
23
21
zd := & ZfsDriver {}
24
22
if len (dss ) < 1 {
25
23
return nil , fmt .Errorf ("No datasets specified" )
You can’t perform that action at this time.
0 commit comments