logging

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package logging provides logging facility for the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(format string, args ...interface{})

Log is a wrapper over Logger.Infof method for providing logging facilities to third-party libraries.

Types

type Logger

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

Logger is a wrapper over built-in SysLog writer. It provides API similar to Logger type in standard library.

func Get

func Get() *Logger

Get layzily returns logger instance. There is only one logger for entire project. In other words the function implements singleton pattern.

func NewLogger

func NewLogger() (*Logger, error)

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{}) (int, error)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{}) (int, error)

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{}) (int, error)

func (*Logger) Noticef

func (l *Logger) Noticef(format string, args ...interface{}) (int, error)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{}) (int, error)

Jump to

Keyboard shortcuts

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