granitic: github.com/graniticio/granitic/facility/logger Index | Files

package logger

import "github.com/graniticio/granitic/facility/logger"

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

Package Files

builder.go controlloglevel.go decorator.go globalloglevel.go

Constants

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

type ApplicationLoggingFacilityBuilder Uses

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 Uses

func (alfb *ApplicationLoggingFacilityBuilder) BuildAndRegister(lm *logging.ComponentLoggerManager, ca *config.ConfigAccessor, cn *ioc.ComponentContainer) error

See FacilityBuilder.BuildAndRegister

func (*ApplicationLoggingFacilityBuilder) DependsOnFacilities Uses

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

See FacilityBuilder.DependsOnFacilities

func (*ApplicationLoggingFacilityBuilder) FacilityName Uses

func (alfb *ApplicationLoggingFacilityBuilder) FacilityName() string

See FacilityBuilder.FacilityName

type FrameworkLogDecorator Uses

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 Uses

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 Uses

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.

Package logger imports 12 packages (graph) and is imported by 1 packages. Updated 2016-10-28. Refresh now. Tools for package owners.