package msg

import "github.com/Diarkis/diarkis/log/lib/msg"

Index

Constants

const LvlCustom = " CUSTOM"

LvlCustom Log level

const LvlDebug = "  DEBUG"

LvlDebug Log level

const LvlErr = "  ERROR"

LvlErr Log level

const LvlFatal = "  FATAL"

LvlFatal Log level

const LvlInfo = "   INFO"

LvlInfo Log level

const LvlNetwork = "NETWORK"

LvlNetwork Log level

const LvlNotice = " NOTICE"

LvlNotice Log level

const LvlSys = " SYSTEM"

LvlSys Log level

const LvlTrace = "  TRACE"

LvlTrace Log level SYS with stacktrace

const LvlVerbose = "VERBOSE"

LvlVerbose Log level

const LvlWarn = "WARNING"

LvlWarn Log level

const OutputPrefix = "[%s]%s%s %s"

OutputPrefix Prefix of log output

const OutputSuffix = "\n"

OutputSuffix Suffix of log output

const TimeZoneLocal = 1

TimeZoneLocal Log time zone

const TimeZoneUTC = 0

TimeZoneUTC Log time zone

Functions

func Debug

func Debug(formatted bool, name string, vals ...interface{}) string

Debug Outputs log

func DisableFlat

func DisableFlat()

DisableFlat Turns off flatten format of log output

func EnableFlat

func EnableFlat()

EnableFlat Turns on flatten format of log output

func Error

func Error(formatted bool, name string, vals ...interface{}) string

Error Outputs log

func Fatal

func Fatal(formatted bool, name string, vals ...interface{}) string

Fatal Outputs log

func GetStackTrace

func GetStackTrace(delimiter string, depth int) string

GetStackTrace returns stack trace [INTERNAL USE ONLY]

func Info

func Info(formatted bool, name string, vals ...interface{}) string

Info Outputs log

func Network

func Network(formatted bool, name string, vals ...interface{}) string

Network Outputs log

func Notice

func Notice(formatted bool, name string, vals ...interface{}) string

Notice Outputs log

func SetCustomOutput

func SetCustomOutput(custom func(formatted bool, name string, prefix string, level string, vals []interface{}) string)

SetCustomOutput Registers a custom function to create a log output string

func SetPrefix

func SetPrefix(pf string)

SetPrefix Sets a prefix for every log

func SetTimeZone

func SetTimeZone(_timeZone string)

SetTimeZone Sets time zone of the log

func Sys

func Sys(formatted bool, name string, vals ...interface{}) string

Sys Outputs log

func Trace

func Trace(formatted bool, name string, vals ...interface{}) string

Trace Outputs log

func UseCustomOutput

func UseCustomOutput()

UseCustomOutput Enables custom output

func Verbose

func Verbose(formatted bool, name string, vals ...interface{}) string

Verbose Outputs log

func Warn

func Warn(formatted bool, name string, vals ...interface{}) string

Warn Outputs log

func Write

func Write(formatted bool, name string, vals ...interface{}) string

Write output custom level log