package
1.11.0
Repository: https://github.com/gflydev/core.git
Documentation: pkg.go.dev

# README

Log

Write logs

Usage

Quick usage

import "github.com/gflydev/core/log"

log.Errorf("Invalid field name")

# Functions

Debug calls the default logger's Debug method.
Debugf calls the default logger's Debugf method.
Debugw logs a message with some additional context.
DefaultLogger returns the default logger.
Error calls the default logger's Error method.
Errorf calls the default logger's Errorf method.
Errorw logs a message with some additional context.
Fatal calls the default logger's Fatal method and then os.Exit(1).
Fatalf calls the default logger's Fatalf method and then os.Exit(1).
Fatalw logs a message with some additional context.
Info calls the default logger's Info method.
Infof calls the default logger's Infof method.
Infow logs a message with some additional context.
Panic calls the default logger's Panic method.
Panicf calls the default logger's Tracef method.
Panicw logs a message with some additional context.
SetLevel sets the level of logs below which logs will not be output.
SetLogger sets the default logger and the system logger.
SetOutput sets the output of default logger and system logger.
Trace calls the default logger's Trace method.
Tracef calls the default logger's Tracef method.
Tracew logs a message with some additional context.
Warn calls the default logger's Warn method.
Warnf calls the default logger's Warnf method.
Warnw logs a message with some additional context.
No description provided by the author

# Constants

The levels of logs.
The levels of logs.
The levels of logs.
The levels of logs.
The levels of logs.
The levels of logs.
The levels of logs.

# Interfaces

AllLogger is the combination of Logger, FormatLogger, CtxLogger and ControlLogger.
No description provided by the author
ControlLogger provides methods to config a logger.
FormatLogger is a logger interface that output logs with a format.
Logger is a logger interface that provides logging function with levels.
WithLogger is a logger interface that output logs with a message and key-value pairs.

# Type aliases

Level defines the priority of a log message.