| 1 | // Copyright The Notary Project Authors. |
| 2 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | // you may not use this file except in compliance with the License. |
| 4 | // You may obtain a copy of the License at |
| 5 | // |
| 6 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | // |
| 8 | // Unless required by applicable law or agreed to in writing, software |
| 9 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | // See the License for the specific language governing permissions and |
| 12 | // limitations under the License. |
| 13 | |
| 14 | // Package log provides logging functionality. |
| 15 | // 3rd party loggers that implement log.Logger: github.com/uber-go/zap.SugaredLogger |
| 16 | // and github.com/sirupsen/logrus.Logger. |
| 17 | package log |
| 18 | |
| 19 | // Logger is implemented by users and/or 3rd party loggers. |
| 20 | // For example, github.com/uber-go/zap.SugaredLogger |
| 21 | // and github.com/sirupsen/logrus.Logger. |
| 22 | type Logger interface { |
| 23 | // Debug logs a debug level message. |
| 24 | Debug(args ...interface{}) |
| 25 | |
| 26 | // Debugf logs a debug level message with format. |
| 27 | Debugf(format string, args ...interface{}) |
| 28 | |
| 29 | // Debugln logs a debug level message. Spaces are always added between |
| 30 | // operands. |
| 31 | Debugln(args ...interface{}) |
| 32 | |
| 33 | // Info logs an info level message. |
| 34 | Info(args ...interface{}) |
| 35 | |
| 36 | // Infof logs an info level message with format. |
| 37 | Infof(format string, args ...interface{}) |
| 38 | |
| 39 | // Infoln logs an info level message. Spaces are always added between |
| 40 | // operands. |
| 41 | Infoln(args ...interface{}) |
| 42 | |
| 43 | // Warn logs a warn level message. |
| 44 | Warn(args ...interface{}) |
| 45 | |
| 46 | // Warnf logs a warn level message with format. |
| 47 | Warnf(format string, args ...interface{}) |
| 48 | |
| 49 | // Warnln logs a warn level message. Spaces are always added between |
| 50 | // operands. |
| 51 | Warnln(args ...interface{}) |
| 52 | |
| 53 | // Error logs an error level message. |
| 54 | Error(args ...interface{}) |
| 55 | |
| 56 | // Errorf logs an error level message with format. |
| 57 | Errorf(format string, args ...interface{}) |
| 58 | |
| 59 | // Errorln logs an error level message. Spaces are always added between |
| 60 | // operands. |
| 61 | Errorln(args ...interface{}) |
| 62 | } |