Categorygithub.com/daneshvar/go-log
modulepackage
1.7.1
Repository: https://github.com/daneshvar/go-log.git
Documentation: pkg.go.dev

# README

Log

package main

import "github.com/daneshvar/go-log"

func main() {
	defer log.Sync()
	log.RedirectStdLog()
	log.Config(log.DebugLevel, true)

	// log.GetLogger()
	// log.SetCaller(true)

	log.Warn("Not Found config file")

	log.Infov("GET",
		"url", "http://example.com/data.json",
	)

	log.Error("Fetch",
		"url", "http://example.com",
		"attempt", 3,
		"backoff", time.Second,
	)
}

# Functions

No description provided by the author
Config logger enabler funcs is immutable response.
No description provided by the author
ConsoleWriterWithOptions use default value of scopeAlign & callerAlign with set they with -1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RedirectStdLog std log to this to Info Level It returns a function to restore the original prefix and flags and reset the standard library's output to os.Stderr.
RedirectStdLogAt std log to this at log level It returns a function to restore the original prefix and flags and reset the standard library's output to os.Stderr.
Sync calls the underlying Core's Sync method, flushing any buffered log.
ToLevel map text of level to log.Level Trace, Debug, Info, Warn or Warning, Error or Err, Fatal, Panic.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Console write log to console stderr.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author