Documentation
¶
Index ¶
- Constants
- Variables
- func GetFormatterFactory(c gapp.ServiceContainer) (*glog.FormatterFactory, error)
- func GetFormatterStrategies(c gapp.ServiceContainer) ([]glog.FormatterStrategy, error)
- func GetLoader(c gapp.ServiceContainer) (*glog.Loader, error)
- func GetLogger(c gapp.ServiceContainer) (*glog.Logger, error)
- func GetStreamFactory(c gapp.ServiceContainer) (*glog.StreamFactory, error)
- func GetStreamStrategies(c gapp.ServiceContainer) ([]glog.StreamStrategy, error)
- type Provider
Constants ¶
const ( // ContainerID defines the id to be used as the container // registration id of a logger instance, as a base id of all other log // package instances registered in the application container. ContainerID = gapp.ContainerID + ".log" // ContainerFormatterStrategyTag defines the tag to be assigned to all // container formatter strategies. ContainerFormatterStrategyTag = ContainerID + ".formatter.strategy" // ContainerFormatterStrategyJSONID defines the id to be used as // the container registration id of a logger json formatter factory // strategy instance. ContainerFormatterStrategyJSONID = ContainerID + ".formatter.strategy.json" // ContainerFormatterFactoryID defines the id to be used as the // container registration id of a logger formatter factory instance. ContainerFormatterFactoryID = ContainerID + ".formatter.factory" // ContainerStreamStrategyTag defines the tag to be assigned to all // container stream strategies. ContainerStreamStrategyTag = ContainerID + ".stream.strategy" // ContainerStreamStrategyConsoleID defines the id to be used as the // container registration id of a logger console stream factory strategy // instance. ContainerStreamStrategyConsoleID = ContainerID + ".stream.strategy.console" // ContainerStreamStrategyFileID defines the id to be used as the // container registration id of a logger file stream factory strategy // instance. ContainerStreamStrategyFileID = ContainerID + ".stream.strategy.file" // ContainerStreamStrategRotatingFileID defines the id to be used as the // container registration id of a logger rotating file stream factory // strategy instance. ContainerStreamStrategRotatingFileID = ContainerID + ".stream.strategy.rotating_file" // ContainerStreamFactoryID defines the id to be used as the container // registration id of a logger stream factory instance. ContainerStreamFactoryID = ContainerID + ".stream.factory" // ContainerLoaderID defines the id to be used as the container // registration id of a logger loader instance. ContainerLoaderID = ContainerID + ".loader" )
Variables ¶
var ( // ErrNilPointer defines a nil pointer argument error ErrNilPointer = gapp.ErrNilPointer // ErrConversion defines a type conversion error ErrConversion = gapp.ErrConversion )
var ( // LoaderActive defines the entry config source active flag // used to signal the config loader to load the streams or not LoaderActive = genv.Bool("GAPP_LOG_LOADER_ACTIVE", true) )
Functions ¶
func GetFormatterFactory ¶ added in v1.0.2
func GetFormatterFactory(c gapp.ServiceContainer) (*glog.FormatterFactory, error)
GetFormatterFactory will try to retrieve the registered formatter factory instance from the application service container.
func GetFormatterStrategies ¶ added in v1.0.2
func GetFormatterStrategies(c gapp.ServiceContainer) ([]glog.FormatterStrategy, error)
GetFormatterStrategies will try to retrieve the registered the list of formatter strategies instances from the application service container.
func GetLoader ¶ added in v1.0.2
func GetLoader(c gapp.ServiceContainer) (*glog.Loader, error)
GetLoader will try to retrieve the registered loader instance from the application service container.
func GetLogger ¶ added in v1.0.2
func GetLogger(c gapp.ServiceContainer) (*glog.Logger, error)
GetLogger will try to retrieve the registered logger manager instance from the application service container.
func GetStreamFactory ¶ added in v1.0.2
func GetStreamFactory(c gapp.ServiceContainer) (*glog.StreamFactory, error)
GetStreamFactory will try to retrieve the registered stream factory instance from the application service container.
func GetStreamStrategies ¶ added in v1.0.2
func GetStreamStrategies(c gapp.ServiceContainer) ([]glog.StreamStrategy, error)
GetStreamStrategies will try to retrieve the registered the list of stream strategies instances from the application service container.
Types ¶
type Provider ¶ added in v1.0.2
type Provider struct{}
Provider defines the gapp/log module service provider to be used on the application initialization to register the logging service.