This commit is contained in:
Ric Szopa 2012-11-14 13:31:27 -08:00
Родитель b7d0c9156b
Коммит 1ae502e0c8
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -110,9 +110,9 @@ func (logger *Logger) Fatal(format string, args ...interface{}) {
// information (like passwords), which shouldn't be printed to the
// log.
type Redactor interface {
// Redact returns a copy of the instance with sensitive
// Redacted returns a copy of the instance with sensitive
// information removed.
Redact() interface{}
Redacted() interface{}
}
// Redact returns a string of * having the same length as s.
@ -127,7 +127,7 @@ func (logger *Logger) Output(level int, format string, args ...interface{}) {
redactedArgs := make([]interface{}, len(args))
for i, arg := range args {
if redactor, ok := arg.(Redactor); ok {
redactedArgs[i] = redactor.Redact()
redactedArgs[i] = redactor.Redacted()
} else {
redactedArgs[i] = arg
}