loggerinf

package
v1.3.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalConfigProcessor

type AdditionalConfigProcessor interface {
	AdditionalConfigBytes() []byte
	AdditionalConfigProcess() error
}

type AllLogWriter

type AllLogWriter interface {
	SuccessWriter() io.Writer
	InfoWriter() io.Writer
	ErrorWriter() io.Writer
	WarningWriter() io.Writer
	DebugWriter() io.Writer
	TraceWriter() io.Writer
	WriterBy(config Configurer) io.Writer
}

type AttrPersistentLogger added in v1.2.1

type AttrPersistentLogger interface {
	internalinterface.IdStringerWithNamer
	LogPathInfo() pathextendinf.PathInfoer
	IsRotating() bool
	IsDbLogger() bool
	IsFileLogger() bool

	DynamicConfig() interface{}
	ConfigReflectSetTo(toPointer interface{}) error

	// PersistentLoggerTyper
	//
	//  Which type of persistent logger
	PersistentLoggerTyper() enuminf.BasicEnumer
}

type BaseLogDefiner

type BaseLogDefiner interface {
	coreinterface.TypeNameGetter
	coreinterface.MessageGetter
}

type BytesCompiler added in v1.3.8

type BytesCompiler interface {
	CompileBytes() ([]byte, error)
}

type BytesCompilerIf added in v1.3.8

type BytesCompilerIf interface {
	CompileBytesIf(isCompile bool) ([]byte, error)
}

type Caller added in v1.2.1

type Caller interface {
	LineNumber() int
	FullFilePath() string
}

type CallerGetter added in v1.2.1

type CallerGetter interface {
	Caller() Caller
}

type Committer added in v1.3.23

type Committer interface {
	Commit()
}

type CompiledAttributesGetter added in v1.2.1

type CompiledAttributesGetter interface {
	CompiledAttributes() string
}

type Compiler added in v1.2.1

type Compiler interface {
	Compile() string
}

type ConditionalBasePersistentLogger added in v1.2.1

type ConditionalBasePersistentLogger interface {
	On(isCondition bool) BasePersistentLogger
	OnErr(err error) BasePersistentLogger
	OnString(message string) BasePersistentLogger
	OnBytes(rawBytes []byte) BasePersistentLogger
}

type ConditionalStandardLogger

type ConditionalStandardLogger interface {
	On(isCondition bool) StandardLogger
	OnErr(err error) StandardLogger
	OnString(expected, actual string) StandardLogger
	OnBytes(expectedRawBytes, actualBytes []byte) StandardLogger

	OnVerbose() SingleLogger
	OnProduction() SingleLogger
	OnTest() SingleLogger
	OnDebug() SingleLogger
	OnJson() SingleLogger
	OnStacktrace() SingleLogger

	OnFlag(name, value string) StandardLogger
	OnAnyFlag(name string, value interface{}) StandardLogger
	OnFunc(isLoggerFunc func(logger StandardLogger) bool) StandardLogger
	OnFlagEnabled(name string) StandardLogger
	OnFlagDisabled(name string) StandardLogger
	StackSkip(index int) StandardLogger
}

type Configurer

type Configurer interface {
	LoggerTyper() LoggerTyper
	StackSkipIndex() int
}

type DebugLogger

type DebugLogger interface {
	Debug(args ...interface{}) // Debug logs a message at Debug level.
}

type EntityTypeNamer added in v1.3.3

type EntityTypeNamer interface {
	EntityTypeName() string
}

type ErrorAsBasicErrWrapperGetter added in v1.2.1

type ErrorAsBasicErrWrapperGetter interface {
	ErrorAsBasicErrWrapper() errcoreinf.BasicErrWrapper
}

type ErrorLogger

type ErrorLogger interface {
	Error(args ...interface{}) // Error logs a message at Error level.
}

type FatalLogger

type FatalLogger interface {
	// Fatal logs a message at Fatal level
	// and process will exit with status set to 1.
	Fatal(args ...interface{})
}

type FileWithLiner added in v1.2.15

type FileWithLiner interface {
	FullFilePath() string
	LineNumber() int
}

type FilterTextGetter added in v1.3.3

type FilterTextGetter interface {
	FilterText() string
}

type FmtCompiler added in v1.2.1

type FmtCompiler interface {
	CompileFmt(formatter string, v ...interface{}) string
}

type FormatDebugLogger

type FormatDebugLogger interface {
	DebugFmt(formatter string, args ...interface{}) // Debug logs a message at Debug level.
}

type FormatErrorLogger

type FormatErrorLogger interface {
	ErrorFmt(
		format string,
		args ...interface{},
	)
	ErrorFmtIf(
		isLog bool,
		format string,
		args ...interface{},
	)
	ErrorFmtStackSkip(
		stackSkipIndex int,
		format string,
		args ...interface{},
	)

	// ErrorFmtUsingError
	//
	// Skip if no error
	ErrorFmtUsingError(
		format string,
		err error,
	)

	// ErrorFmtUsingErrorStackSkip
	//
	// Skip if no error
	ErrorFmtUsingErrorStackSkip(
		stackSkipIndex int,
		format string,
		err error,
	)
	WarnFmtStackSkip(
		stackSkipIndex int,
		format string,
		args ...interface{},
	)
	InfoFmtStackSkip(
		stackSkipIndex int,
		format string,
		args ...interface{},
	)
	WarnStackSkip(
		stackSkipIndex int,
		args ...interface{},
	)

	InfoStackSkip(
		stackSkipIndex int,
		args ...interface{},
	)
}

type FormatFatalLogger

type FormatFatalLogger interface {
	// FatalFmt
	//
	// logs a message at Fatal level
	// and process will exit with status set to 1.
	FatalFmt(format string, args ...interface{})
	FatalFmtStackSkip(
		stackSkipIndex int,
		format string,
		args ...interface{},
	)
}

type FormatInfoLogger

type FormatInfoLogger interface {
	InfoFmt(format string, args ...interface{}) // Info logs a message at Info level.
}

type FormatLogger

type FormatLogger interface {
	FormatFatalLogger   // Fatal logs a message at Fatal level
	FormatErrorLogger   // Error logs a message at Error level.
	FormatWarningLogger // Warn logs a message at Warning level.
	FormatInfoLogger    // Info logs a message at Info level.
	FormatDebugLogger   // Debug logs a message at Debug level.
}

type FormatWarningLogger

type FormatWarningLogger interface {
	WarnFmt(format string, args ...interface{}) // Warn logs a message at Warning level.
}

type FullLogger added in v1.2.1

type FullLogger interface {
	LogModel(
		stackSkip int,
		logType LoggerTyper,
		title string,
		model SingleLogModeler,
	)

	LogModelNoTitle(
		stackSkip int,
		logType LoggerTyper,
		model SingleLogModeler,
	)

	LogString(
		stackSkip int,
		logType LoggerTyper,
		title string,
		attr string,
	)

	LogStringType(
		stackSkip int,
		logType LoggerTyper,
		filterType enuminf.BasicEnumer,
		levelType enuminf.LogLevelTyper,
		title string,
		attr string,
		model interface{},
	)

	LogAll(
		stackSkip int,
		logType LoggerTyper,
		message, attributes string,
	)

	LogAllUsingStackSkip(
		stackSkipIndex int,
		logType LoggerTyper,
		message, attributes string,
	)
	LogAllUsingConfig(
		config Configurer,
		message, attributes string,
	)
}

type HasModelChecker added in v1.2.1

type HasModelChecker interface {
	HasModel() bool
}

type HasParentChecker added in v1.2.1

type HasParentChecker interface {
	HasParent() bool
}

type IfStringCompiler added in v1.2.1

type IfStringCompiler interface {
	CompileIf(isCompile bool) string
}

type InfoLogger

type InfoLogger interface {
	Info(args ...interface{}) // Info logs a message at Info level.
}

type LogDefinerWriter

type LogDefinerWriter interface {
	LogWrite(logEntity LogDefiner) error
	LogWriteMust(logEntity LogDefiner)
	LogWriteUsingStackSkip(
		stackSkipIndex int,
		logEntity LogDefiner,
	) error
}

type LogMessageGetter added in v1.2.1

type LogMessageGetter interface {
	LogMessage() string
}

type LogTypeChecker

type LogTypeChecker interface {
	internalinterface.LogTypeChecker
}

type LogTypeWriter

type LogTypeWriter interface {
	LogTypeWrite(logType string, v ...interface{}) error
	LogTypeWriteMust(logType string, v ...interface{})

	LogTypeWriteStackSkip(
		stackSkipIndex int,
		logType string,
		v ...interface{},
	) error

	LogTypeWriteStackSkipMust(
		stackSkipIndex int,
		logType string,
		v ...interface{},
	)
}

type Logger

type Logger interface {
	FatalLogger   // Fatal logs a message at Fatal level
	ErrorLogger   // Error logs a message at Error level.
	WarningLogger // Warn logs a message at Warning level.
	InfoLogger    // Info logs a message at Info level.
	DebugLogger   // Debug logs a message at Debug level.
}

Logger

logs message to io.Writer at various log levels.

type LoggerContractsBinder

type LoggerContractsBinder interface {
	Logger
	AsLogger() Logger
}

type LoggerStackSkip

type LoggerStackSkip interface {
	FatalStackSkip(
		stackSkipIndex int,
		args ...interface{},
	)
	ErrorStackSkip(
		stackSkipIndex int,
		args ...interface{},
	)

	// ErrorUsingError
	//
	// Skip if no error
	ErrorUsingError(err error)

	// ErrorUsingErrorStackSkip
	//
	// Skip if no error
	ErrorUsingErrorStackSkip(
		stackSkipIndex int,
		err error,
	)

	ErrorIf(isLog bool, args ...interface{})
	DebugFmtIf(
		isLog bool,
		formatter string,
		args ...interface{},
	)
	DebugFmtStackSkip(
		stackSkipIndex int,
		format string,
		args ...interface{},
	)

	DebugIf(isLog bool, args ...interface{}) // Debug logs a message at Debug level.
	DebugStackSkip(
		stackSkipIndex int,
		args ...interface{},
	)

	DebugIncludingStackTracesIf(
		isLog bool,
		stackSkipIndex int,
		args ...interface{},
	)
	DebugIncludingStackTraces(
		stackSkipIndex int,
		args ...interface{},
	)
}

type LoggerTyper

type LoggerTyper interface {
	internalinterface.LoggerTyper
}

type LoggerWithFormatLogger

type LoggerWithFormatLogger interface {
	Logger
	FormatLogger
}

type LoggerWithFormatLoggerContractsBinder

type LoggerWithFormatLoggerContractsBinder interface {
	LoggerWithFormatLogger
	AsLoggerWithFormatLoggerContractsBinder() LoggerWithFormatLoggerContractsBinder
}

type MetaAttributesCompiler added in v1.2.1

type MetaAttributesCompiler interface {
	coreinterface.Disposer

	StringFinalizer
	IfStringCompiler
	Compiler
	FmtCompiler
	// Committer
	//
	// logs and clears
	Committer
	CompileAnyTo(toPointer interface{}) error
	CompileAny() interface{}
	CompileStacks() []string
	ReflectSetter
	CompileMap() map[string]interface{}
	CompileToJsonResult() *corejson.Result

	CompiledAsBasicErr(
		basicErrTyper errcoreinf.BasicErrorTyper,
	) errcoreinf.BasicErrWrapper

	BytesCompiler
	BytesCompilerIf
	MustBytesCompiler
}

type MetaAttributesStacker added in v1.2.1

type MetaAttributesStacker interface {
	enuminf.LoggerTyperGetter

	On(isLog bool) MetaAttributesStacker

	IsSilent() bool

	Msg(message string) MetaAttributesStacker
	Title(title string) MetaAttributesStacker
	TitleAttr(title, attr string) MetaAttributesStacker
	Str(title, val string) MetaAttributesStacker
	Strings(title string, stringItems ...string) MetaAttributesStacker
	StandardSlicer(title string, standardSlice coreinterface.StandardSlicer) MetaAttributesStacker
	Stringer(title string, stringer fmt.Stringer) MetaAttributesStacker
	Stringers(title string, stringers ...fmt.Stringer) MetaAttributesStacker
	Byte(title string, singleByteValue byte) MetaAttributesStacker
	Bytes(title string, values []byte) MetaAttributesStacker
	Hex(title string, hexValues []byte) MetaAttributesStacker
	RawJson(title string, rawJsonBytes []byte) MetaAttributesStacker
	Error(title string, err error) MetaAttributesStacker
	AnErr(key string, err error) MetaAttributesStacker

	SimpleBytesResulter(
		title string,
		result serializerinf.SimpleBytesResulter,
	) MetaAttributesStacker

	BaseJsonResulter(
		title string,
		result serializerinf.BaseJsonResulter,
	) MetaAttributesStacker

	BasicJsonResulter(
		title string,
		result serializerinf.BasicJsonResulter,
	) MetaAttributesStacker
	JsonResulter(
		title string,
		result serializerinf.JsonResulter,
	) MetaAttributesStacker

	MapIntegerAny(title string, mapAny map[int]interface{}) MetaAttributesStacker
	Meta(title string, metaAttr MetaAttributesCompiler) MetaAttributesStacker

	MapBool(title string, mapInt map[string]bool) MetaAttributesStacker
	MapInt(title string, mapInt map[string]int) MetaAttributesStacker
	MapAnyAny(title string, mapAny map[interface{}]interface{}) MetaAttributesStacker
	MapAny(title string, mapAny map[string]interface{}) MetaAttributesStacker
	MapIntAny(title string, mapAny map[int]interface{}) MetaAttributesStacker
	MapIntString(title string, mapAny map[int]string) MetaAttributesStacker
	MapJsonResult(title string, mapAny map[string]corejson.Result) MetaAttributesStacker

	JsonResult(title string, json *corejson.Result) MetaAttributesStacker
	JsonResultItems(title string, jsons ...*corejson.Result) MetaAttributesStacker

	Err(err error) MetaAttributesStacker

	DefaultStackTraces() MetaAttributesStacker
	ErrWithTypeTraces(title string, errType errcoreinf.BasicErrorTyper, err error) MetaAttributesStacker
	ErrorsWithTypeTraces(title string, errType errcoreinf.BasicErrorTyper, errorItems ...error) MetaAttributesStacker
	StackTraces(stackSkipIndex int, title string) MetaAttributesStacker
	OnErrStackTraces(err error) MetaAttributesStacker
	OnErrWrapperOrCollectionStackTraces(errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper) MetaAttributesStacker

	FullStringer(
		title string,
		fullStringer errcoreinf.FullStringer,
	) MetaAttributesStacker

	OnlyFullStringer(
		fullStringer errcoreinf.FullStringer,
	) MetaAttributesStacker

	FullTraceAsAttr(
		title string,
		attrFullStringWithTraces errcoreinf.FullStringWithTracesGetter,
	) MetaAttributesStacker

	BasicErrWrapper(errWrapperOrCollection errcoreinf.BasicErrWrapper) MetaAttributesStacker
	BaseRawErrCollectionDefiner(errWrapperOrCollection errcoreinf.BaseRawErrCollectionDefiner) MetaAttributesStacker
	BaseErrorWrapperCollectionDefiner(errWrapperOrCollection errcoreinf.BaseErrorWrapperCollectionDefiner) MetaAttributesStacker
	ErrWrapperOrCollection(errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper) MetaAttributesStacker
	RawErrCollection(key string, err errcoreinf.BaseRawErrCollectionDefiner) MetaAttributesStacker
	CompiledBasicErrWrapper(compiler errcoreinf.CompiledBasicErrWrapper) MetaAttributesStacker

	Namer(title string, namer enuminf.Namer) MetaAttributesStacker
	OnlyNamer(namer enuminf.Namer) MetaAttributesStacker

	EnumTitleEnum(title enuminf.SimpleEnumer, enum enuminf.BasicEnumer) MetaAttributesStacker
	SimpleEnumTitleEnum(title enuminf.SimpleEnumer, enum enuminf.SimpleEnumer) MetaAttributesStacker
	Enum(title string, enum enuminf.BasicEnumer) MetaAttributesStacker
	Enums(key string, enums ...enuminf.BasicEnumer) MetaAttributesStacker
	OnlyEnum(enum enuminf.BasicEnumer) MetaAttributesStacker
	OnlyEnums(enums ...enuminf.BasicEnumer) MetaAttributesStacker
	OnlyString(value string) MetaAttributesStacker
	OnlyStrings(values ...string) MetaAttributesStacker

	OnlyStringer(stringer fmt.Stringer) MetaAttributesStacker
	OnlyStringers(stringers ...fmt.Stringer) MetaAttributesStacker

	OnlyIntegers(values ...int) MetaAttributesStacker
	OnlyBooleans(values ...bool) MetaAttributesStacker
	OnlyBytes(rawBytes []byte) MetaAttributesStacker
	OnlyRawJson(rawBytes []byte) MetaAttributesStacker
	OnlyBytesErr(rawBytes []byte, err error) MetaAttributesStacker

	OnlySimpleBytesResulter(
		result serializerinf.SimpleBytesResulter,
	) MetaAttributesStacker

	OnlyBaseJsonResulter(
		result serializerinf.BaseJsonResulter,
	) MetaAttributesStacker

	OnlyBasicJsonResulter(
		result serializerinf.BasicJsonResulter,
	) MetaAttributesStacker
	OnlyJsonResulter(
		result serializerinf.JsonResulter,
	) MetaAttributesStacker

	OnlyAny(anyItem interface{}) MetaAttributesStacker
	OnlyAnyItems(values ...interface{}) MetaAttributesStacker
	OnlyMetaAttr(metaAttr MetaAttributesCompiler) MetaAttributesStacker
	OnlyAnyIf(isLog bool, anyItem interface{}) MetaAttributesStacker
	OnlyAnyItemsIf(isLog bool, anyItems ...interface{}) MetaAttributesStacker

	OnlyMapBool(mapInt map[string]bool) MetaAttributesStacker
	OnlyMapInt(mapInt map[string]int) MetaAttributesStacker
	OnlyMapAny(mapAny map[string]interface{}) MetaAttributesStacker
	OnlyMapIntAny(mapAny map[int]interface{}) MetaAttributesStacker
	OnlyMapIntString(mapAny map[int]string) MetaAttributesStacker
	OnlyMapJsonResult(mapAny map[string]corejson.Result) MetaAttributesStacker

	OnlyJson(json *corejson.Result) MetaAttributesStacker
	OnlyJsons(jsons ...*corejson.Result) MetaAttributesStacker

	Bool(title string, isResult bool) MetaAttributesStacker
	Booleans(title string, isResults ...bool) MetaAttributesStacker

	Any(title string, anyItem interface{}) MetaAttributesStacker

	Jsoner(jsoner corejson.Jsoner) MetaAttributesStacker
	Jsoners(jsoners ...corejson.Jsoner) MetaAttributesStacker
	JsonerTitle(title string, jsoner corejson.Jsoner) MetaAttributesStacker
	JsonerIf(isLog bool, jsoner corejson.Jsoner) MetaAttributesStacker
	JsonersIf(isLog bool, jsoners ...corejson.Jsoner) MetaAttributesStacker

	Serializer(serializer Serializer) MetaAttributesStacker
	Serializers(serializers ...Serializer) MetaAttributesStacker
	SerializerFunc(serializerFunc func() ([]byte, error)) MetaAttributesStacker
	SerializerFunctions(serializerFunctions ...func() ([]byte, error)) MetaAttributesStacker

	StandardTaskEntityDefiner(entity entityinf.StandardTaskEntityDefiner) MetaAttributesStacker
	TaskEntityDefiner(entity entityinf.TaskEntityDefiner) MetaAttributesStacker

	StandardTaskEntityDefinerTitle(title string, entity entityinf.StandardTaskEntityDefiner) MetaAttributesStacker
	TaskEntityDefinerTitle(title string, entity entityinf.TaskEntityDefiner) MetaAttributesStacker

	LoggerModel(loggerModel SingleLogModeler) MetaAttributesStacker
	LoggerModelTitle(title string, loggerModel SingleLogModeler) MetaAttributesStacker

	Int(key string, i int) MetaAttributesStacker
	Integers(key string, integerItems ...int) MetaAttributesStacker
	Fmt(title, format string, v ...interface{}) MetaAttributesStacker
	FmtIf(isLog bool, title, format string, v ...interface{}) MetaAttributesStacker

	OnlyFmt(format string, v ...interface{}) MetaAttributesStacker
	OnlyFmtIf(isLog bool, format string, v ...interface{}) MetaAttributesStacker

	RawPayloadsGetter(payloadsGetter RawPayloadsGetter) MetaAttributesStacker
	RawPayloadsGetterTitle(title string, payloadsGetter RawPayloadsGetter) MetaAttributesStacker
	RawPayloadsGetterIf(isLog bool, payloadsGetter RawPayloadsGetter) MetaAttributesStacker

	Inject(others ...MetaAttributesStacker) MetaAttributesStacker
	ConcatNew(others ...MetaAttributesStacker) MetaAttributesStacker
	coreinterface.Clearer

	Items() map[string]interface{}

	GetAsStrings() []string
	HasKey(name string) bool
	GetVal(keyName string) (val interface{})

	MetaAttributesCompiler
	coreinterface.StandardSlicerContractsBinder
}

type MetaAttributesWithoutTileStacker added in v1.3.2

type MetaAttributesWithoutTileStacker interface {
	enuminf.LoggerTyperGetter

	Title() string
	IsSilent() bool

	On(isLog bool) MetaAttributesWithoutTileStacker
	Attr(attr string) MetaAttributesWithoutTileStacker
	Str(val string) MetaAttributesWithoutTileStacker
	Strings(stringItems ...string) MetaAttributesWithoutTileStacker
	StandardSlicer(standardSlice coreinterface.StandardSlicer) MetaAttributesWithoutTileStacker
	Stringer(stringer fmt.Stringer) MetaAttributesWithoutTileStacker
	Stringers(stringers ...fmt.Stringer) MetaAttributesWithoutTileStacker
	Byte(singleByteValue byte) MetaAttributesWithoutTileStacker
	Bytes(values []byte) MetaAttributesWithoutTileStacker
	Hex(hexValues []byte) MetaAttributesWithoutTileStacker
	RawJson(rawJsonBytes []byte) MetaAttributesWithoutTileStacker
	Error(err error) MetaAttributesWithoutTileStacker
	MapAny(mapAny map[string]interface{}) MetaAttributesWithoutTileStacker
	MapIntegerAny(mapAny map[int]interface{}) MetaAttributesWithoutTileStacker

	JsonResult(json *corejson.Result) MetaAttributesWithoutTileStacker
	JsonResultItems(jsons ...*corejson.Result) MetaAttributesWithoutTileStacker

	Err(err error) MetaAttributesWithoutTileStacker

	DefaultStackTraces() MetaAttributesWithoutTileStacker

	ErrWithTypeTraces(errType errcoreinf.BasicErrorTyper, err error) MetaAttributesWithoutTileStacker
	ErrorsWithTypeTraces(errType errcoreinf.BasicErrorTyper, errorItems ...error) MetaAttributesWithoutTileStacker
	StackTraces(stackSkipIndex int) MetaAttributesWithoutTileStacker
	OnErrStackTraces(err error) MetaAttributesWithoutTileStacker
	OnErrWrapperOrCollectionStackTraces(
		errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper,
	) MetaAttributesWithoutTileStacker

	FullStringer(
		fullStringer errcoreinf.FullStringer,
	) MetaAttributesWithoutTileStacker

	FullStringerTitle(
		title string,
		fullStringer errcoreinf.FullStringer,
	) MetaAttributesWithoutTileStacker
	FullTraceAsAttr(
		title string,
		attrFullStringWithTraces errcoreinf.FullStringWithTracesGetter,
	) MetaAttributesWithoutTileStacker

	BasicErrWrapper(errWrapperOrCollection errcoreinf.BasicErrWrapper) MetaAttributesWithoutTileStacker
	BaseRawErrCollectionDefiner(errWrapperOrCollection errcoreinf.BaseRawErrCollectionDefiner) MetaAttributesWithoutTileStacker
	BaseErrorWrapperCollectionDefiner(errWrapperOrCollection errcoreinf.BaseErrorWrapperCollectionDefiner) MetaAttributesWithoutTileStacker
	ErrWrapperOrCollection(errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper) MetaAttributesWithoutTileStacker
	RawErrCollection(err errcoreinf.BaseRawErrCollectionDefiner) MetaAttributesWithoutTileStacker
	CompiledBasicErrWrapper(compiler errcoreinf.CompiledBasicErrWrapper) MetaAttributesWithoutTileStacker

	Namer(namer enuminf.Namer) MetaAttributesWithoutTileStacker

	SimpleEnum(enum enuminf.SimpleEnumer) MetaAttributesWithoutTileStacker
	SimpleEnums(enums ...enuminf.SimpleEnumer) MetaAttributesWithoutTileStacker
	Enum(enum enuminf.BasicEnumer) MetaAttributesWithoutTileStacker
	Enums(enums ...enuminf.BasicEnumer) MetaAttributesWithoutTileStacker
	OnlyEnum(enum enuminf.BasicEnumer) MetaAttributesWithoutTileStacker
	OnlyEnums(enums ...enuminf.BasicEnumer) MetaAttributesWithoutTileStacker

	OnlyString(value string) MetaAttributesWithoutTileStacker
	OnlyStrings(values ...string) MetaAttributesWithoutTileStacker
	OnlyIntegers(values ...int) MetaAttributesWithoutTileStacker
	OnlyBooleans(values ...bool) MetaAttributesWithoutTileStacker
	OnlyBytes(rawBytes []byte) MetaAttributesWithoutTileStacker
	OnlyRawJson(rawBytes []byte) MetaAttributesWithoutTileStacker
	OnlyBytesErr(rawBytes []byte, err error) MetaAttributesWithoutTileStacker

	// OnlyAnyItems
	//
	//  Convert any values to json
	OnlyAnyItems(values ...interface{}) MetaAttributesWithoutTileStacker

	// OnlyAnyItemsString
	//
	//  Convert any values to string
	OnlyAnyItemsString(values ...interface{}) MetaAttributesWithoutTileStacker
	// OnlyAnyItemsJson
	//
	//  Convert any values to json then compile
	OnlyAnyItemsJson(values ...interface{}) MetaAttributesWithoutTileStacker

	Bool(isResult bool) MetaAttributesWithoutTileStacker
	Booleans(isResults ...bool) MetaAttributesWithoutTileStacker

	// Any
	//
	//  Convert any item to json
	Any(anyItem interface{}) MetaAttributesWithoutTileStacker
	// AnyIf
	//
	//  Convert any item to json
	AnyIf(isLog bool, anyItem interface{}) MetaAttributesWithoutTileStacker
	// AnyItems
	//
	//  Convert any item to json
	AnyItems(anyItems ...interface{}) MetaAttributesWithoutTileStacker
	// AnyItemsIf
	//
	//  Convert any item to json
	AnyItemsIf(isLog bool, anyItems ...interface{}) MetaAttributesWithoutTileStacker

	AnyItemsJson(title string, anyItems ...interface{}) MetaAttributesWithoutTileStacker
	AnyItemsString(title string, anyItems ...interface{}) MetaAttributesWithoutTileStacker

	Jsoner(jsoner corejson.Jsoner) MetaAttributesWithoutTileStacker
	Jsoners(jsoners ...corejson.Jsoner) MetaAttributesWithoutTileStacker
	JsonerTitle(jsoner corejson.Jsoner) MetaAttributesWithoutTileStacker
	JsonerIf(isLog bool, jsoner corejson.Jsoner) MetaAttributesWithoutTileStacker
	JsonersIf(isLog bool, jsoners ...corejson.Jsoner) MetaAttributesWithoutTileStacker

	Serializer(serializer Serializer) MetaAttributesWithoutTileStacker
	Serializers(serializers ...Serializer) MetaAttributesWithoutTileStacker
	SerializerFunc(serializerFunc func() ([]byte, error)) MetaAttributesWithoutTileStacker
	SerializerFunctions(serializerFunctions ...func() ([]byte, error)) MetaAttributesWithoutTileStacker

	StandardTaskEntityDefiner(entity entityinf.StandardTaskEntityDefiner) MetaAttributesWithoutTileStacker
	TaskEntityDefiner(entity entityinf.TaskEntityDefiner) MetaAttributesWithoutTileStacker

	StandardTaskEntityDefinerTitle(entity entityinf.StandardTaskEntityDefiner) MetaAttributesWithoutTileStacker
	TaskEntityDefinerTitle(entity entityinf.TaskEntityDefiner) MetaAttributesWithoutTileStacker

	LoggerModel(loggerModel SingleLogModeler) MetaAttributesWithoutTileStacker
	LoggerModelTitle(loggerModel SingleLogModeler) MetaAttributesWithoutTileStacker

	Int(i int) MetaAttributesWithoutTileStacker
	Integers(integerItems ...int) MetaAttributesWithoutTileStacker
	Fmt(format string, v ...interface{}) MetaAttributesWithoutTileStacker
	FmtIf(isLog bool, format string, v ...interface{}) MetaAttributesWithoutTileStacker

	RawPayloadsGetter(payloadsGetter RawPayloadsGetter) MetaAttributesWithoutTileStacker
	RawPayloadsGetterIf(isLog bool, payloadsGetter RawPayloadsGetter) MetaAttributesWithoutTileStacker

	Inject(others ...MetaAttributesWithoutTileStacker) MetaAttributesWithoutTileStacker
	ConcatNew(others ...MetaAttributesWithoutTileStacker) MetaAttributesWithoutTileStacker
	coreinterface.Clearer

	Items() map[string]interface{}

	GetAsStrings() []string
	HasKey(name string) bool
	GetVal(keyName string) (val interface{})

	MetaAttributesCompiler
	coreinterface.StandardSlicerContractsBinder
}

type ModelBytesGetter added in v1.2.1

type ModelBytesGetter interface {
	ModelBytes() []byte
}

type ModelCollectioner added in v1.2.1

type ModelCollectioner interface {
	List() []SingleLogModeler
}

type MustBytesCompiler added in v1.3.8

type MustBytesCompiler interface {
	CompileBytesMust() []byte
}

type NewGeneralWriter

type NewGeneralWriter interface {
	NewGeneralWriter(writeConfigurer WriterConfigurer) io.Writer
}

type ParentPersistentIdGetter added in v1.2.1

type ParentPersistentIdGetter interface {
	ParentPersistentId() uint
}

type PersistentIdGetter added in v1.2.1

type PersistentIdGetter interface {
	PersistentId() uint
}

type RawPayloadsGetter added in v1.2.1

type RawPayloadsGetter interface {
	internalinterface.RawPayloadsGetter
}

type ReflectSetter added in v1.2.16

type ReflectSetter interface {
	// ReflectSetTo
	//
	// ReflectSetter
	//  sets current object to something else by casting,
	//  reflection, by unmarshalling or by marshalling
	//
	// Set any object from to toPointer object
	//
	// Valid Inputs or Supported (https://t.ly/1Lpt):
	//  - From, To: (null, null)                          -- do nothing
	//  - From, To: (sameTypePointer, sameTypePointer)    -- try reflection
	//  - From, To: (sameTypeNonPointer, sameTypePointer) -- try reflection
	//  - From, To: ([]byte or *[]byte, otherType)        -- try unmarshal, reflect
	//  - From, To: (otherType, *[]byte)                  -- try marshal, reflect
	//
	// Validations:
	//  - Check null, if both null no error return quickly.
	//  - NotSupported returns as error.
	//      - NotSupported: (from, to) - (..., not pointer)
	//      - NotSupported: (from, to) - (null, notNull)
	//      - NotSupported: (from, to) - (notNull, null)
	//      - NotSupported: (from, to) - not same type and not bytes on any
	//  - `From` null or nil is not supported and will return error.
	//
	// Reference:
	//  - Reflection String Set Example : https://go.dev/play/p/fySLYuOvoRK.go?download=true
	//  - Method document screenshot    : https://prnt.sc/26dmf5g
	ReflectSetTo(toPointer interface{}) error
}

ReflectSetter

ReflectSetTo

sets current object to something else by casting,
reflection, by unmarshalling or by marshalling

Set any object from to toPointer object

Valid Inputs or Supported (https://t.ly/1Lpt):

  • From, To: (null, null) -- do nothing
  • From, To: (sameTypePointer, sameTypePointer) -- try reflection
  • From, To: (sameTypeNonPointer, sameTypePointer) -- try reflection
  • From, To: ([]byte or *[]byte, otherType) -- try unmarshal, reflect
  • From, To: (otherType, *[]byte) -- try marshal, reflect

Validations:

  • Check null, if both null no error return quickly.
  • NotSupported returns as error.
  • NotSupported: (from, to) - (..., not pointer)
  • NotSupported: (from, to) - (null, notNull)
  • NotSupported: (from, to) - (notNull, null)
  • NotSupported: (from, to) - not same type and not bytes on any
  • `From` null or nil is not supported and will return error.

Reference:

type Serializer added in v1.2.1

type Serializer interface {
	Serialize() ([]byte, error)
}

type SingleLogger added in v1.2.1

type SingleLogger interface {
	enuminf.LoggerTyperGetter

	IsSilent() bool

	Stack() MetaAttributesStacker
	StackTitle(title string) MetaAttributesStacker

	On(isLog bool) SingleLogger
	StackSkip(stackSkipIndex int) SingleLogger
	OnString(input, expected string) SingleLogger

	Title(message string) SingleLogger
	Msg(message string) SingleLogger
	TitleAttr(message, attr string) SingleLogger
	Log(message string) SingleLogger
	LogAttr(message, attr string) SingleLogger
	Str(title, val string) SingleLogger
	Strings(title string, values []string) SingleLogger
	StringsSpread(title string, values ...string) SingleLogger
	Stringer(title string, stringer fmt.Stringer) SingleLogger
	Stringers(title string, stringers ...fmt.Stringer) SingleLogger
	Byte(title string, val byte) SingleLogger
	Bytes(title string, values []byte) SingleLogger
	Hex(title string, val []byte) SingleLogger
	RawJson(title string, rawJson []byte) SingleLogger
	Err(err error) SingleLogger
	AnErr(title string, err error) SingleLogger

	SimpleBytesResulter(
		title string,
		result serializerinf.SimpleBytesResulter,
	) MetaAttributesStacker

	BaseJsonResulter(
		title string,
		result serializerinf.BaseJsonResulter,
	) MetaAttributesStacker

	BasicJsonResulter(
		title string,
		result serializerinf.BasicJsonResulter,
	) MetaAttributesStacker
	JsonResulter(
		title string,
		result serializerinf.JsonResulter,
	) MetaAttributesStacker

	ErrWithType(title string, errType errcoreinf.BasicErrorTyper, err error) SingleLogger
	Meta(title string, metaAttr MetaAttributesCompiler) SingleLogger

	MapBool(title string, mapInt map[string]bool) SingleLogger
	MapInt(title string, mapInt map[string]int) SingleLogger
	MapAnyAny(title string, mapAny map[interface{}]interface{}) SingleLogger
	MapAny(title string, mapAny map[string]interface{}) SingleLogger
	MapIntAny(title string, mapAny map[int]interface{}) SingleLogger
	MapIntString(title string, mapAny map[int]string) SingleLogger
	MapJsonResult(title string, mapAny map[string]corejson.Result) SingleLogger

	DefaultStackTraces() SingleLogger
	ErrWithTypeTraces(title string, errType errcoreinf.BasicErrorTyper, err error) SingleLogger
	ErrorsWithTypeTraces(title string, errType errcoreinf.BasicErrorTyper, errorItems ...error) SingleLogger
	StackTraces(stackSkipIndex int, title string) SingleLogger
	OnErrStackTraces(err error) SingleLogger
	OnErrWrapperOrCollectionStackTraces(errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper) SingleLogger

	FullStringer(
		fullStringer errcoreinf.FullStringer,
	) SingleLogger

	FullStringerTitle(
		title string,
		fullStringer errcoreinf.FullStringer,
	) SingleLogger
	FullTraceAsAttr(
		title string,
		attrFullStringWithTraces errcoreinf.FullStringWithTracesGetter,
	) SingleLogger

	BasicErrWrapper(basicErrWrapper errcoreinf.BasicErrWrapper) SingleLogger
	BaseRawErrCollectionDefiner(rawErrCollection errcoreinf.BaseRawErrCollectionDefiner) SingleLogger
	BaseErrorWrapperCollectionDefiner(errWrapperCollection errcoreinf.BaseErrorWrapperCollectionDefiner) SingleLogger
	ErrWrapperOrCollection(errWrapperOrCollection errcoreinf.BaseErrorOrCollectionWrapper) SingleLogger
	RawErrCollection(title string, err errcoreinf.BaseRawErrCollectionDefiner) SingleLogger
	CompiledBasicErrWrapper(compiler errcoreinf.CompiledBasicErrWrapper) SingleLogger

	Namer(title string, namer enuminf.Namer) SingleLogger
	Enum(title string, enum enuminf.BasicEnumer) SingleLogger
	Enums(title string, enums ...enuminf.BasicEnumer) SingleLogger

	OnlyNamer(namer enuminf.Namer) SingleLogger
	OnlyEnum(enum enuminf.BasicEnumer) SingleLogger
	OnlyEnums(enums ...enuminf.BasicEnumer) SingleLogger
	OnlyError(err error) SingleLogger
	OnlyString(value string) SingleLogger
	OnlyStrings(values ...string) SingleLogger
	OnlyMetaAttr(metaAttr MetaAttributesCompiler) SingleLogger

	OnlyStringer(stringer fmt.Stringer) SingleLogger
	OnlyStringers(stringers ...fmt.Stringer) SingleLogger

	OnlyIntegers(values ...int) SingleLogger
	OnlyBooleans(values ...bool) SingleLogger
	OnlyBytes(rawBytes []byte) SingleLogger
	OnlyRawJson(rawBytes []byte) SingleLogger
	OnlyBytesErr(rawBytes []byte, err error) SingleLogger

	OnlyAny(anyItem interface{}) SingleLogger
	OnlyAnyItems(values ...interface{}) SingleLogger
	OnlyAnyIf(isLog bool, anyItem interface{}) SingleLogger
	OnlyAnyItemsIf(isLog bool, anyItems ...interface{}) SingleLogger

	Bool(title string, isResult bool) SingleLogger
	Booleans(title string, isResults ...bool) SingleLogger

	OnlyMapBool(mapInt map[string]bool) SingleLogger
	OnlyMapInt(mapInt map[string]int) SingleLogger
	OnlyMapAny(mapAny map[string]interface{}) SingleLogger
	OnlyMapAnyAny(mapAny map[interface{}]interface{}) SingleLogger
	OnlyMapIntAny(mapAny map[int]interface{}) SingleLogger
	OnlyMapIntString(mapAny map[int]string) SingleLogger
	OnlyMapJsonResult(mapAny map[string]corejson.Result) SingleLogger

	OnlySimpleBytesResulter(
		result serializerinf.SimpleBytesResulter,
	) SingleLogger

	OnlyBaseJsonResulter(
		result serializerinf.BaseJsonResulter,
	) SingleLogger

	OnlyBasicJsonResulter(
		result serializerinf.BasicJsonResulter,
	) SingleLogger
	OnlyJsonResulter(
		result serializerinf.JsonResulter,
	) SingleLogger

	AnyJsonLog(anyItem interface{}) SingleLogger
	Any(anyItem interface{}) SingleLogger
	AnyIf(isLog bool, anyItem interface{}) SingleLogger
	AnyItems(anyItems ...interface{}) SingleLogger
	AnyItemsIf(isLog bool, anyItems ...interface{}) SingleLogger

	OnlyJson(json *corejson.Result) SingleLogger
	OnlyJsons(jsons ...*corejson.Result) SingleLogger

	Jsoner(title string, jsoner corejson.Jsoner) SingleLogger
	Jsoners(jsoners ...corejson.Jsoner) SingleLogger
	OnlyJsoner(jsoner corejson.Jsoner) SingleLogger

	Serializer(serializer Serializer) SingleLogger
	Serializers(serializers ...Serializer) SingleLogger
	SerializerFunc(serializerFunc func() ([]byte, error)) SingleLogger
	SerializerFunctions(serializerFunctions ...func() ([]byte, error)) SingleLogger

	StandardTaskEntityDefiner(entity entityinf.StandardTaskEntityDefiner) SingleLogger
	TaskEntityDefiner(entity entityinf.TaskEntityDefiner) SingleLogger

	StandardTaskEntityDefinerTitle(title string, entity entityinf.StandardTaskEntityDefiner) SingleLogger
	TaskEntityDefinerTitle(title string, entity entityinf.TaskEntityDefiner) SingleLogger

	LogModel(model SingleLogModeler) SingleLogger
	LogModelTitle(title string, model SingleLogModeler) SingleLogger

	Int(title string, i int) SingleLogger
	Integers(title string, integerItems ...int) SingleLogger

	FmtIf(isLog bool, format string, v ...interface{}) SingleLogger
	Fmt(format string, v ...interface{}) SingleLogger
	AttrFmt(title string, attrFormat string, attrValues ...interface{}) SingleLogger

	RawPayloadsGetter(payloadsGetter RawPayloadsGetter) SingleLogger
	RawPayloadsGetterTitle(title string, payloadsGetter RawPayloadsGetter) SingleLogger

	Logger() StandardLogger
}

type SpecificValuer added in v1.2.1

type SpecificValuer interface {
	IsAnyValueDefined() bool
	BytesVal() []byte
	StringVal() string
	BooleanVal() bool
	IntegerVal() int

	ByteVal() byte
	HasAnyKeyValuePair() bool
	HasAnyKeyValues() bool

	KeyValuesLength() int
	AnyKeyValuesLength() int

	IsEmptyKeyValuePairs() bool
	IsEmptyAnyKeyValuePairs() bool

	AnyValuesMap() map[string]interface{}
	KeyValuesPairsMap() map[string]string

	GetAnyValue(key string) (val interface{}, isFound bool)
	GetKeyValue(key string) (val string, isFound bool)

	AnyValueReflectSetTo(toPtr interface{}) error
}

type SpecificValuerGetter added in v1.2.1

type SpecificValuerGetter interface {
	SpecificValuer() SpecificValuer
}

type StandardLogger

type StandardLogger interface {
	StandardLoggerChecker
	ConditionalStandardLogger

	FullLogger() FullLogger
	EnvOptioner() enuminf.EnvironmentOptioner

	TaskNamedLogger(
		taskName string,
	) StandardLogger

	TaskWithPayloadLogger(
		taskName string,
		payloadAny interface{},
	) StandardLogger

	GetLoggerByTaskName(taskName string) StandardLogger
	GetLoggerByTaskNamer(taskNamer enuminf.Namer) StandardLogger

	Success(args ...interface{}) StandardLogger
	Info(args ...interface{}) StandardLogger
	Trace(args ...interface{}) StandardLogger
	Debug(args ...interface{}) StandardLogger
	Warn(args ...interface{}) StandardLogger
	Error(args ...interface{}) StandardLogger
	Fatal(args ...interface{}) StandardLogger
	Panic(args ...interface{}) StandardLogger

	SuccessFmt(format string, args ...interface{}) StandardLogger
	InfoFmt(format string, args ...interface{}) StandardLogger
	TraceFmt(format string, args ...interface{}) StandardLogger
	DebugFmt(format string, args ...interface{}) StandardLogger
	WarnFmt(format string, args ...interface{}) StandardLogger
	ErrorFmt(format string, args ...interface{}) StandardLogger
	FatalFmt(format string, args ...interface{}) StandardLogger
	PanicFmt(format string, args ...interface{}) StandardLogger

	SuccessExtend() SingleLogger
	InfoExtend() SingleLogger
	TraceExtend() SingleLogger
	DebugExtend() SingleLogger
	WarnExtend() SingleLogger
	FatalExtend() SingleLogger
	PanicExtend() SingleLogger

	ErrorDirect(err error) StandardLogger
	OnErrStackTrace(err error) StandardLogger
	ErrInterface(errInf errcoreinf.BaseErrorOrCollectionWrapper) StandardLogger
	ErrInterfaceStackTraces(errInfWithStackTraces errcoreinf.BaseErrorOrCollectionWrapper) StandardLogger

	ReflectSetter

	InfoOrError(isError bool) SingleLogger
	Log(loggerType enuminf.LoggerTyper) StandardLogger

	ErrorJsoner(jsoner corejson.Jsoner) StandardLogger
	DebugJsoner(jsoner corejson.Jsoner) StandardLogger
	ErrorJsonerTitle(title string, jsoner corejson.Jsoner) StandardLogger
	DebugJsonerTitle(title string, jsoner corejson.Jsoner) StandardLogger
}

type StandardLoggerChecker added in v1.2.1

type StandardLoggerChecker interface {
	IsVerbose() bool
	IsProduction() bool
	IsTest() bool
	IsDebug() bool
	IsLog() bool
	IsStacktrace() bool
	IsJson() bool
}

type StandardLoggerGetter

type StandardLoggerGetter interface {
	StandardLogger() StandardLogger
}

type StringFinalizer added in v1.2.1

type StringFinalizer interface {
	Finalize() string
}

type VoidFatalLogger

type VoidFatalLogger interface {
	LogFatal()
}

type VoidLogger

type VoidLogger interface {
	Log()
}

type VoidStringLogger

type VoidStringLogger interface {
	Log(message string)
}

type WarningLogger

type WarningLogger interface {
	Warn(args ...interface{}) // Warn logs a message at Warning level.
}

type WriterConfigurer

type WriterConfigurer interface {
	Configurer
	AdditionalConfigProcessor
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL