github.com/trustbloc/kms-go@v1.1.2/spi/log/log.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package log
     8  
     9  // Level is a log level for a logging message.
    10  type Level int
    11  
    12  // Log levels.
    13  const (
    14  	CRITICAL Level = iota
    15  	ERROR
    16  	WARNING
    17  	INFO
    18  	DEBUG
    19  )
    20  
    21  // Logger represents a general-purpose logger.
    22  type Logger interface {
    23  	Panicf(msg string, args ...interface{})
    24  	Fatalf(msg string, args ...interface{})
    25  	Errorf(msg string, args ...interface{})
    26  	Warnf(msg string, args ...interface{})
    27  	Infof(msg string, args ...interface{})
    28  	Debugf(msg string, args ...interface{})
    29  }
    30  
    31  // LoggerProvider is a factory for moduled loggers.
    32  type LoggerProvider interface {
    33  	GetLogger(module string) Logger
    34  }