log

package
v0.0.0-...-6d7c776 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package log contains an interface to logging system

*

## ## ######## ## ## ####### ######## ######## ######## ######## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ## ######## ## ## ###### ######## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ### ### ####### ## ## ######## ######## ## ##

"NewOrder" - Reverse Proxy SE
    "CHANGE THE WORLD..."

Copyright 2022 (C) NEMESIS. neworder@tutamail.com. All rights reserved.

*

*

## ## ######## ## ## ####### ######## ######## ######## ######## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ## ## ## ## ## ######## ## ## ###### ######## ## #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######## ### ### ####### ## ## ######## ######## ## ##

"NewOrder" - Reverse Proxy SE
    "CHANGE THE WORLD..."

Copyright 2022 (C) NEMESIS. neworder@tutamail.com. All rights reserved.

*

Index

Constants

This section is empty.

Variables

View Source
var (
	// Effects is a map of the tokens that can be used in Format to
	// change the properties of the text.
	Effects = map[string]string{
		"{bold}":        tui.BOLD,
		"{dim}":         tui.DIM,
		"{red}":         tui.RED,
		"{green}":       tui.GREEN,
		"{blue}":        tui.BLUE,
		"{yellow}":      tui.YELLOW,
		"{f:black}":     tui.FOREBLACK,
		"{f:white}":     tui.FOREWHITE,
		"{b:darkgray}":  tui.BACKDARKGRAY,
		"{b:red}":       tui.BACKRED,
		"{b:green}":     tui.BACKGREEN,
		"{b:yellow}":    tui.BACKYELLOW,
		"{b:lightblue}": tui.BACKLIGHTBLUE,
		"{reset}":       tui.RESET,
	}

	FormatConfigBasic = FormatConfig{
		DateFormat:     dateFormat,
		TimeFormat:     timeFormat,
		DateTimeFormat: dateTimeFormat,
		Format:         format,
	}
)

Functions

func AddOutput

func AddOutput(path string, level ll.Verbosity, config FormatConfig, noEffects bool) (err error)

func Debug

func Debug(format string, args ...interface{})

Debug emits a debug message.

func Error

func Error(format string, args ...interface{})

Error emits an error message.

func Fatal

func Fatal(format string, args ...interface{})

Fatal emits a fatal error message and calls the ll.OnFatal callback.

func Important

func Important(format string, args ...interface{})

Important emits an important informative message.

func Info

func Info(format string, args ...interface{})

Info emits an informative message.

func Init

func Init(opt core.Options, isLogToFile bool, logFilePath string)

func Raw

func Raw(format string, args ...interface{})

Raw emits a message without format to the logs.

func Warning

func Warning(format string, args ...interface{})

Warning emits a warning message.

Types

type FormatConfig

type FormatConfig struct {
	DateFormat     string
	TimeFormat     string
	DateTimeFormat string
	Format         string
}

Jump to

Keyboard shortcuts

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