logger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package logger provides the FrameworkLogging and ApplicationLogging facilities which control logging from framework and application components.

Full documentation for this facility can be found at http://granitic.io/1.0/ref/logging and GoDoc for the logging types that your application will interact with are detailled in the logging package.

Index

Constants

View Source
const (
	GLLComponentName = instance.FrameworkPrefix + "CommandGlobalLevel"
)
View Source
const (
	LLComponentName = instance.FrameworkPrefix + "CommandLogLevel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationLoggingFacilityBuilder

type ApplicationLoggingFacilityBuilder struct {
}

Creates a new logging.ComponentLoggerManager for application components and updates the framework's ComponentLoggerManager (which was bootstraped with a command-line supplied global log level) with the application's logging configuration.

func (*ApplicationLoggingFacilityBuilder) BuildAndRegister

See FacilityBuilder.BuildAndRegister

func (*ApplicationLoggingFacilityBuilder) DependsOnFacilities

func (alfb *ApplicationLoggingFacilityBuilder) DependsOnFacilities() []string

See FacilityBuilder.DependsOnFacilities

func (*ApplicationLoggingFacilityBuilder) FacilityName

func (alfb *ApplicationLoggingFacilityBuilder) FacilityName() string

See FacilityBuilder.FacilityName

type FrameworkLogDecorator

type FrameworkLogDecorator struct {
	// The framework ComponentLoggerManager (as opposed to the application ComponentLoggerManager)
	LoggerManager *logging.ComponentLoggerManager

	// Logger to allow this decorator to log messages.
	FrameworkLogger logging.Logger
}

Injects a framework logger into Granitic framework components.

func (*FrameworkLogDecorator) DecorateComponent

func (fld *FrameworkLogDecorator) DecorateComponent(component *ioc.Component, container *ioc.ComponentContainer)

DecorateComponent injects a newly created Logger into the FrameworkLogger field of the subject component.

func (*FrameworkLogDecorator) OfInterest

func (fld *FrameworkLogDecorator) OfInterest(component *ioc.Component) bool

OfInterest returns true if the subject component has a field of type logging.Logger and the name FrameworkLogger.

Jump to

Keyboard shortcuts

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