|
|
@@ -239,16 +239,38 @@ type TimeAttackDetector interface {
|
|
239
|
239
|
// logger1 should see no param2 and vice versa, logger2 should not see param1
|
|
240
|
240
|
// If you attach a parameter to a logger, parents should not know about that.
|
|
241
|
241
|
type Logger interface {
|
|
|
242
|
+ // Named returns a new logger with a bound name. Name chaining is
|
|
|
243
|
+ // allowed and appreciated.
|
|
242
|
244
|
Named(name string) Logger
|
|
243
|
245
|
|
|
|
246
|
+ // BindInt binds new integer parameter to a new logger instance.
|
|
244
|
247
|
BindInt(name string, value int) Logger
|
|
|
248
|
+
|
|
|
249
|
+ // BindStr binds new string parameter to a new logger instance.
|
|
245
|
250
|
BindStr(name, value string) Logger
|
|
246
|
251
|
|
|
|
252
|
+ // Printf is to support log.Logger behavior.
|
|
247
|
253
|
Printf(format string, args ...interface{})
|
|
|
254
|
+
|
|
|
255
|
+ // Info puts a message about some normal situation.
|
|
248
|
256
|
Info(msg string)
|
|
|
257
|
+
|
|
|
258
|
+ // InfoError puts a message about some normal situation but this
|
|
|
259
|
+ // situation is related to a given error.
|
|
249
|
260
|
InfoError(msg string, err error)
|
|
|
261
|
+
|
|
|
262
|
+ // Warning puts a message about some extraordinary situation
|
|
|
263
|
+ // worth to look at.
|
|
250
|
264
|
Warning(msg string)
|
|
|
265
|
+
|
|
|
266
|
+ // WarningError puts a message about some extraordinary situation
|
|
|
267
|
+ // worth to look at. This situation is related to a given error.
|
|
251
|
268
|
WarningError(msg string, err error)
|
|
|
269
|
+
|
|
|
270
|
+ // Debug puts a message useful for debugging only.
|
|
252
|
271
|
Debug(msg string)
|
|
|
272
|
+
|
|
|
273
|
+ // Debug puts a message useful for debugging only. This message is
|
|
|
274
|
+ // related to a given error.
|
|
253
|
275
|
DebugError(msg string, err error)
|
|
254
|
276
|
}
|