...

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"

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(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(name string, vals ...interface{}) string

Error Outputs log

func Fatal

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

Fatal Outputs log

func Info

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

Info Outputs log

func Notice

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

Notice Outputs log

func SetCustomOutput

func SetCustomOutput(custom func(string, string, string, []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(name string, vals ...interface{}) string

Sys Outputs log

func Trace

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

Trace Outputs log

func UseCustomOutput

func UseCustomOutput()

UseCustomOutput Enables custom output

func Verbose

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

Verbose Outputs log

func Warn

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

Warn Outputs log

func Write

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

Write output custom level log