Browse code

use %s instead of %q when format in graphdirver log

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2016/07/30 03:12:55
Showing 1 changed files
... ...
@@ -157,7 +157,7 @@ func getBuiltinDriver(name, home string, options []string, uidMaps, gidMaps []id
157 157
 // New creates the driver and initializes it at the specified root.
158 158
 func New(root string, name string, options []string, uidMaps, gidMaps []idtools.IDMap) (Driver, error) {
159 159
 	if name != "" {
160
-		logrus.Debugf("[graphdriver] trying provided driver %q", name) // so the logs show specified driver
160
+		logrus.Debugf("[graphdriver] trying provided driver: %s", name) // so the logs show specified driver
161 161
 		return GetDriver(name, root, options, uidMaps, gidMaps)
162 162
 	}
163 163
 
... ...
@@ -177,7 +177,7 @@ func New(root string, name string, options []string, uidMaps, gidMaps []idtools.
177 177
 				// state, and now it is no longer supported/prereq/compatible, so
178 178
 				// something changed and needs attention. Otherwise the daemon's
179 179
 				// images would just "disappear".
180
-				logrus.Errorf("[graphdriver] prior storage driver %q failed: %s", name, err)
180
+				logrus.Errorf("[graphdriver] prior storage driver %s failed: %s", name, err)
181 181
 				return nil, err
182 182
 			}
183 183
 
... ...
@@ -189,10 +189,10 @@ func New(root string, name string, options []string, uidMaps, gidMaps []idtools.
189 189
 					driversSlice = append(driversSlice, name)
190 190
 				}
191 191
 
192
-				return nil, fmt.Errorf("%q contains several valid graphdrivers: %s; Please cleanup or explicitly choose storage driver (-s <DRIVER>)", root, strings.Join(driversSlice, ", "))
192
+				return nil, fmt.Errorf("%s contains several valid graphdrivers: %s; Please cleanup or explicitly choose storage driver (-s <DRIVER>)", root, strings.Join(driversSlice, ", "))
193 193
 			}
194 194
 
195
-			logrus.Infof("[graphdriver] using prior storage driver %q", name)
195
+			logrus.Infof("[graphdriver] using prior storage driver: %s", name)
196 196
 			return driver, nil
197 197
 		}
198 198
 	}