logger

package
v0.0.0-...-43a8b31 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Main   = "main"
	Router = "router"

	Access   = "access"
	Config   = "config"
	Database = "database"
	Email    = "email"
	Flags    = "flags"
	NonProd  = "nonprod"
	Parsing  = "parsing"
	Trip     = "trip"
	User     = "user"
)

Variables

This section is empty.

Functions

func Cleanup

func Cleanup()

Cleanup - Close log file Deprecated: DO NOT CALL THIS FUNCTION aside from `cleanup()` in main

func Debug

func Debug(message ...interface{})

Debug - This will print message to the terminal but not

into the log file.

Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugBlue

func DebugBlue(message ...interface{})

DebugBlue - Same as `Debug()` but blue Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugCaller

func DebugCaller(level int)

DebugCaller - Shows the entire call stack on how the code is reached Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugCyan

func DebugCyan(message ...interface{})

DebugCyan - Same as `Debug()` but cyan Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugGreen

func DebugGreen(message ...interface{})

DebugGreen - Same as `Debug()` but green Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugPink

func DebugPink(message ...interface{})

DebugPink - Same as `Debug()` but pink Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func DebugPurple

func DebugPurple(message ...interface{})

DebugPurple - Same as `Debug()` but purple Deprecated: DO NOT COMMIT USE OF THIS FUNCTION.

func Err

func Err(namespace Namespace, err error, message string)

Err - Prints message in red indicating its an error

(`if err != nil`) but does not call `panic()` nor ends

the program

func Exit

func Exit(namespace Namespace, message string)

Exit - This is used for logging in cleanup functions. Calls

here are not guaranteed to be stored into the log files
but will always be displayed in the terminal.

func Failure

func Failure(namespace Namespace, message string)

Failure - Similar to Print but text in Red to indicate failure

func FromMain

func FromMain()

FromMain - Initializing from main Deprecated: DO NOT CALL THIS FUNCTION aside from `cleanup()` in main

func NewLine

func NewLine()

NewLine - Print an empty newline in terminal. Purely aesthetic reason.

func Panic

func Panic(namespace Namespace, message string)

Panic - Similar to Print() but calls panic right after

func PanicErr

func PanicErr(
	namespace Namespace, err error, message string)

PanicErr - Triggers Panic() on the condition that

`if err != nil`

func Print

func Print(namespace Namespace, message string)

Print - Print the message into the log file and the command line

func Success

func Success(namespace Namespace, message string)

Success - Similar to Print but text in Green to indicate success

Types

type Namespace

type Namespace string

Jump to

Keyboard shortcuts

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