Documentation ¶
Index ¶
- func ClearCausationId(ctx context.Context) context.Context
- func ClearCorrId(ctx context.Context) context.Context
- func Debug(ctx context.Context, logString string)
- func Debugf(ctx context.Context, s string, i ...interface{})
- func Error(ctx context.Context, logString string)
- func Errorf(ctx context.Context, s string, i ...interface{})
- func Fatal(ctx context.Context, logString string)
- func Fatalf(ctx context.Context, s string, i ...interface{})
- func GenCausationId(ctx context.Context) context.Context
- func GenCorrId(ctx context.Context) context.Context
- func GetAppName(ctx context.Context) string
- func GetCausationId(ctx context.Context) string
- func GetContextStringValue(ctx context.Context, key ContextType) (val string)
- func GetCorrId(ctx context.Context) string
- func Info(ctx context.Context, logString string)
- func Infof(ctx context.Context, s string, i ...interface{})
- func IsLogEnabled(ctx context.Context) bool
- func LogEnvVars(ctx context.Context)
- func LogMemory(ctx context.Context, loggingType LoggingType)
- func SetAppName(ctx context.Context, s string) context.Context
- func SetCausationId(ctx context.Context, s string) context.Context
- func SetContextStringValue(ctx context.Context, key ContextType, value string) context.Context
- func SetCorrId(ctx context.Context, s string) context.Context
- func SetLogEnabled(ctx context.Context, s LoggingEnabled) context.Context
- func SetLogLevel(ctx context.Context, s LoggingType) context.Context
- func Warn(ctx context.Context, logString string)
- func Warnf(ctx context.Context, s string, i ...interface{})
- type Caller
- type ContextType
- type LoggingEnabled
- type LoggingType
- type Metric
- type MetricTypeID
- type Metrics
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCausationId ¶
ClearCausationId -
func GetAppName ¶ added in v0.1.1
func GetContextStringValue ¶ added in v0.1.1
func GetContextStringValue(ctx context.Context, key ContextType) (val string)
func IsLogEnabled ¶ added in v0.1.1
func LogEnvVars ¶
func LogMemory ¶
func LogMemory(ctx context.Context, loggingType LoggingType)
LogMemory prints memory usage to the trace
func SetCausationId ¶
SetCausationId -
func SetContextStringValue ¶ added in v0.1.1
func SetLogEnabled ¶ added in v0.1.1
func SetLogEnabled(ctx context.Context, s LoggingEnabled) context.Context
func SetLogLevel ¶ added in v0.1.1
func SetLogLevel(ctx context.Context, s LoggingType) context.Context
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
Caller is externalised
type ContextType ¶ added in v0.1.1
type ContextType string
const ( CONTEXT_APPNAME ContextType = "appName" CONTEXT_CAUSATION_ID ContextType = "causationId" CONTEXT_CORRELATION_ID ContextType = "correlationId" CONTEXT_LOG_ENABLED ContextType = "LOG_ENABLED" CONTEXT_LOG_LEVEL ContextType = "LOG_LEVEL" )
type LoggingEnabled ¶ added in v0.1.2
type LoggingEnabled string
const ( LOGGING_ON LoggingEnabled = "TRUE" LOGGING_OFF LoggingEnabled = "FALSE" )
type LoggingType ¶ added in v0.1.1
type LoggingType string
const ( LOGGING_DEBUG LoggingType = "DEBUG" LOGGING_INFO LoggingType = "INFO" LOGGING_WARN LoggingType = "WARN" LOGGING_ERROR LoggingType = "ERROR" LOGGING_FATAL LoggingType = "FATAL" LOGGING_PANIC LoggingType = "PANIC" LOGGING_EXIT LoggingType = "EXIT" )
func GetLogLevel ¶ added in v0.1.1
func GetLogLevel(ctx context.Context) LoggingType
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric type to contain observations
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics type to contain observations
func (*Metrics) SetDuration ¶
SetDuration blah
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer holds start and end times
func (*Timer) EndAndPrint ¶
EndAndPrint ends the timer and prints the number of seconds
func (*Timer) EndAndPrintStderr ¶
EndAndPrintStderr ends the timer and prints the number of seconds
Click to show internal directories.
Click to hide internal directories.