klogger

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 3 Imported by: 8

README

go-klogger

GoDoc Build Status Go Report Card

A minimalistic log wrapper providing a common interface for both GAE log and the go log package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLILogger

type CLILogger struct {
}

CLILogger is a simple logger based on the the official go package

func (CLILogger) Criticalf

func (l CLILogger) Criticalf(format string, args ...interface{})

Criticalf is like Debugf, but at Critical level and panics after printing the error.

func (CLILogger) Debugf

func (l CLILogger) Debugf(format string, args ...interface{})

Debugf formats its arguments according to the format, analogous to fmt.Printf, and prints the text using log.Printf.

func (CLILogger) Errorf

func (l CLILogger) Errorf(format string, args ...interface{})

Errorf is like Debugf, but at Error level.

func (CLILogger) Infof

func (l CLILogger) Infof(format string, args ...interface{})

Infof is like Debugf, but at Info level.

func (CLILogger) Warningf

func (l CLILogger) Warningf(format string, args ...interface{})

Warningf is like Debugf, but at Warning level.

type GAELogger

type GAELogger struct {
	Context context.Context
}

GAELogger is a simple log wrapper for the GAE log

func (GAELogger) Criticalf

func (l GAELogger) Criticalf(format string, args ...interface{})

Criticalf is like Debugf, but at Critical level and panics after printing the error.

func (GAELogger) Debugf

func (l GAELogger) Debugf(format string, args ...interface{})

Debugf formats its arguments according to the format, analogous to fmt.Printf, and prints the text using log.Printf.

func (GAELogger) Errorf

func (l GAELogger) Errorf(format string, args ...interface{})

Errorf is like Debugf, but at Error level.

func (GAELogger) Infof

func (l GAELogger) Infof(format string, args ...interface{})

Infof is like Debugf, but at Info level.

func (GAELogger) Warningf

func (l GAELogger) Warningf(format string, args ...interface{})

Warningf is like Debugf, but at Warning level.

type KLogger

type KLogger interface {
	Criticalf(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warningf(format string, args ...interface{})
}

KLogger is a minimalistic interface to wrap both the Google App Engine and default golang log packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL