Documentation ¶
Overview ¶
Package json defines the logging JSON formatter and JSON formatter creation strategy to be integrated into the logging package formatter factory instance.
Index ¶
Constants ¶
const ( // Format defines the value to be used to declare a // JSON Log formatter format. Format = "json" )
const ( // ID defines the application container registration string for the // logging JSON formatter strategy. ID = formatter.ID + ".json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter struct{}
Formatter defines an instance used to format a log message into a JSON string.
type FormatterStrategy ¶
type FormatterStrategy struct{}
FormatterStrategy defines a log message JSON formatter generation strategy.
func NewFormatterStrategy ¶
func NewFormatterStrategy() *FormatterStrategy
NewFormatterStrategy generates a new JSON formatter generation strategy instance.
func (FormatterStrategy) Accept ¶
func (FormatterStrategy) Accept( format string, ) bool
Accept will check if the formatter factory strategy can instantiate a formatter of the requested format.
func (FormatterStrategy) Create ¶
func (FormatterStrategy) Create( _ ...interface{}, ) (log.IFormatter, error)
Create will instantiate the desired formatter instance.
type Provider ¶
type Provider struct{}
Provider defines the slate.config module service provider to be used on the application initialization to register the config service.