logger

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 1 Imported by: 4

Documentation

Overview

Package logger defines how to log in trails as well as provide a default implementation of that interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, data map[string]interface{})
	Error(msg string, data map[string]interface{})
	Fatal(msg string, data map[string]interface{})
	Info(msg string, data map[string]interface{})
	Warn(msg string, data map[string]interface{})
}

The Logger interface defines the levels a logging can occur at.

func NewLogger added in v0.3.1

func NewLogger() Logger

NewLogger constructs a TrailsLogger.

type TrailsLogger

type TrailsLogger struct {
	// contains filtered or unexported fields
}

TrailsLogger implements Logger using log.

func (*TrailsLogger) Debug

func (l *TrailsLogger) Debug(msg string, data map[string]interface{})

Debug writes a debug log.

func (*TrailsLogger) Error

func (l *TrailsLogger) Error(msg string, data map[string]interface{})

Debug writes an error log.

func (*TrailsLogger) Fatal

func (l *TrailsLogger) Fatal(msg string, data map[string]interface{})

Debug writes a fatal log.

func (*TrailsLogger) Info

func (l *TrailsLogger) Info(msg string, data map[string]interface{})

Info writes an info log.

func (*TrailsLogger) Warn

func (l *TrailsLogger) Warn(msg string, data map[string]interface{})

Warn writes a warning log.

Jump to

Keyboard shortcuts

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