logging

package
v0.0.0-...-2920ad6 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package logging with logging configuration

Index

Constants

This section is empty.

Variables

View Source
var Logger *logrus.Logger
View Source
var ZapLogger *zap.Logger

Functions

func InitLogrus

func InitLogrus(levelName string, logFile string) *logrus.Logger

InitLogrus initializes and returns the logrus logger

  1. sets the logging level

  2. sets the timeFormat to ISO8601 YYYY-MM-DDTHH:MM:SS.sss-TZ

  3. optionally write all logging to file

  4. write debug and info to stdout

  5. write warning, error, fatal to stderr

    levelName is the requested logging level: "error", "warning", "info", "debug" filename is the output log file full name including path

func InitZap

func InitZap(levelName string, filename string) *zap.Logger

InitZap initializes the zap logger

func SetLogging

func SetLogging(levelName string, logFile string)

SetLogging initializes the global logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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