casbin: Index | Files

package log

import ""


Package Files

default_logger.go log_util.go logger.go

func LogPrint Uses

func LogPrint(v ...interface{})

LogPrint prints the log.

func LogPrintf Uses

func LogPrintf(format string, v ...interface{})

LogPrintf prints the log with the format.

func SetLogger Uses

func SetLogger(l Logger)

SetLogger sets the current logger.

type DefaultLogger Uses

type DefaultLogger struct {
    // contains filtered or unexported fields

DefaultLogger is the implementation for a Logger using golang log.

func (*DefaultLogger) EnableLog Uses

func (l *DefaultLogger) EnableLog(enable bool)

func (*DefaultLogger) IsEnabled Uses

func (l *DefaultLogger) IsEnabled() bool

func (*DefaultLogger) Print Uses

func (l *DefaultLogger) Print(v ...interface{})

func (*DefaultLogger) Printf Uses

func (l *DefaultLogger) Printf(format string, v ...interface{})

type Logger Uses

type Logger interface {
    //EnableLog controls whether print the message.

    //IsEnabled returns if logger is enabled.
    IsEnabled() bool

    //Print formats using the default formats for its operands and logs the message.

    //Printf formats according to a format specifier and logs the message.
    Printf(string, ...interface{})

Logger is the logging interface implementation.

func GetLogger Uses

func GetLogger() Logger

GetLogger returns the current logger.

Package log imports 2 packages (graph) and is imported by 7 packages. Updated 2020-07-04. Refresh now. Tools for package owners.