golog

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package golog integrates the WebPA common logging with github.com/ian-kent/go-log.

Index

Constants

View Source
const (
	ConsoleFileName string  = "console"
	DefaultPattern  Pattern = "[%d] [%p] (%l) %m%n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerFactory

type LoggerFactory struct {
	File      string  `json:"file"`
	Level     string  `json:"level"`
	Pattern   Pattern `json:"pattern"`
	MaxSize   int64   `json:"maxSize"`
	MaxBackup int     `json:"maxBackup"`
}

LoggerFactory is the golog-specific factory for logs. It is configurable via JSON.

func (*LoggerFactory) NewAppender

func (factory *LoggerFactory) NewAppender() (appenders.Appender, error)

NewAppender creates a golog Appender from this LoggerFactory's configuration

func (*LoggerFactory) NewLogger

func (factory *LoggerFactory) NewLogger(name string) (logging.Logger, error)

NewLogger provides the implementation of logging.LoggerFactory

type Pattern

type Pattern string

Pattern is a log4j-style pattern for use with go-log

func (Pattern) MarshalJSON

func (p Pattern) MarshalJSON() ([]byte, error)

func (Pattern) ToLayout

func (p Pattern) ToLayout() layout.Layout

ToLayout converts this golog.Pattern into a layout.Layout

func (*Pattern) UnmarshalJSON

func (p *Pattern) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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