...

Package msg

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

Overview ▾

Constants

LvlCustom Log level

const LvlCustom = " CUSTOM"

LvlDebug Log level

const LvlDebug = "  DEBUG"

LvlErr Log level

const LvlErr = "  ERROR"

LvlFatal Log level

const LvlFatal = "  FATAL"

LvlInfo Log level

const LvlInfo = "   INFO"

LvlNetwork Log level

const LvlNetwork = " NETWORK"

LvlNotice Log level

const LvlNotice = " NOTICE"

LvlSys Log level

const LvlSys = " SYSTEM"

LvlTrace Log level SYS with stacktrace

const LvlTrace = "  TRACE"

LvlVerbose Log level

const LvlVerbose = "VERBOSE"

LvlWarn Log level

const LvlWarn = "WARNING"

OutputPrefix Prefix of log output

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

OutputSuffix Suffix of log output

const OutputSuffix = "\n"

TimeZoneLocal Log time zone

const TimeZoneLocal = 1

TimeZoneUTC Log time zone

const TimeZoneUTC = 0

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