Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrComponentFailure = errors.New("failed to get caller information") ErrJSONIndentFailure = errors.New("failed to indent data into JSON") ErrJSONConversion = errors.New("failed to convert input to JSON") ErrJSONUnmarshal = errors.New("failed to unmarshal JSON") ErrUnexpectedType = errors.New("unexpected data type after JSON conversion") ErrFieldTruncation = errors.New("some fields were truncated") )
Functions ¶
func FormatDuration ¶
FormatDuration dynamically chooses the best unit for logging.
Types ¶
type Blackbox ¶
type Blackbox interface {
// contains filtered or unexported methods
}
WARN: Methods from this interface require black-box testing because they internally call package-level functions (e.g., http.NewRequest) that are not easily mockable or stubbable. While we have access to their implementation, mocking or stubbing these functions is not practical. As a result, these methods are best tested using black-box testing techniques, such as input-based testing, where explicit error scenarios are triggered. Alternatively, these methods can also be tested using function variables.
type LogOption ¶
type LogOption func(*LogOptions)
func WithLevelKey ¶
func WithMaxLen ¶
func WithMessageKey ¶
func WithTimeKey ¶
type LogOptions ¶
func ApplyLogOptions ¶
func ApplyLogOptions(opts *LogOptions, modifiers ...LogOption) LogOptions
Click to show internal directories.
Click to hide internal directories.