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 (
1818)
1919
2020const (
21- version = "0.1.4 "
21+ version = "1.0.5 "
2222 shutdownTimeout = 10 * time .Second
2323)
2424
2525func main () {
2626
27+ verbose := false
2728 app := cli .NewApp ()
2829 app .Name = "docker-zfs-plugin"
2930 app .Usage = "Docker ZFS Plugin"
@@ -33,8 +34,19 @@ func main() {
3334 Name : "dataset-name" ,
3435 Usage : "Name of the ZFS dataset to be used. It will be created if it doesn't exist." ,
3536 },
37+ cli.BoolFlag {
38+ Name : "verbose" ,
39+ Usage : "verbose output" ,
40+ Destination : & verbose ,
41+ },
3642 }
3743 app .Action = Run
44+ app .Before = func (c * cli.Context ) error {
45+ if verbose {
46+ log .SetLevel (log .DebugLevel )
47+ }
48+ return nil
49+ }
3850 err := app .Run (os .Args )
3951 if err != nil {
4052 panic (err )
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ type ZfsDriver struct {
1717
1818//NewZfsDriver returns the plugin driver object
1919func NewZfsDriver (dss ... string ) (* ZfsDriver , error ) {
20- log .SetLevel (log .DebugLevel )
2120 log .Debug ("Creating new ZfsDriver." )
22-
2321 zd := & ZfsDriver {}
2422 if len (dss ) < 1 {
2523 return nil , fmt .Errorf ("No datasets specified" )
You can’t perform that action at this time.
0 commit comments