Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeySetup = "Setup" KeyConfig = "Config" TypeStackdriver = "stackdriver" TypeStdout = "stdout" )
View Source
const Key = Namespace("log")
Key is a name of the plugin variable
Variables ¶
This section is empty.
Functions ¶
func Infof ¶
func Infof(format force.Expression, args ...interface{}) (force.Action, error)
Infof returns an action that logs in info
Types ¶
type Config ¶
type Config struct { // Level is a debugging level Level string // Outputs is a list of logging outputs Outputs []Output }
Config is a log configuration
func (*Config) CheckAndSetDefaults ¶
CheckAndSetDefaults checks and sets default values
type InfofAction ¶
type InfofAction struct {
// contains filtered or unexported fields
}
func (*InfofAction) Eval ¶
func (s *InfofAction) Eval(ctx force.ExecutionContext) (interface{}, error)
func (*InfofAction) MarshalCode ¶
func (s *InfofAction) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals the action into code representation
func (*InfofAction) String ¶
func (s *InfofAction) String() string
func (*InfofAction) Type ¶
func (s *InfofAction) Type() interface{}
type Logger ¶
type Logger struct { log.FieldLogger // contains filtered or unexported fields }
type Namespace ¶
type Namespace string
Namespace is a wrapper around string to namespace a variable in the context
type Output ¶
type Output struct { // Type is a logging type, currently supported // is stackdriver and stdout Type string // CredentialsFile is a path to credentials file, // used in case of stackdriver plugin CredentialsFile string // Credentials is a string with creds Credentials string }
Output is a logging output
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is a new logging plugin
type Setup ¶
type Setup struct {
// contains filtered or unexported fields
}
Setup creates new instances of plugins
func (*Setup) Eval ¶
func (n *Setup) Eval(ctx force.ExecutionContext) (interface{}, error)
Eval sets up logging plugin for the instance group
func (*Setup) MarshalCode ¶
func (n *Setup) MarshalCode(ctx force.ExecutionContext) ([]byte, error)
MarshalCode marshals plugin setup to code
func (*Setup) NewInstance ¶
NewInstance returns a new instance of a plugin bound to group
Click to show internal directories.
Click to hide internal directories.