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.