sak

package module
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 6 Imported by: 1

README

sak

A simple logging module for Go. The design is meant to be as simple as humanly possible.

I use it. You may. Or may not. It's chock-full of my own solecisms, subject to evolution as needed.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Opts    = Options{}
	LogHist []LogEntry
)

Functions

func LOG

func LOG(n int, msgs ...interface{})

Types

type L

type L struct {
	F string // "facility" equivalent/tag
	S string // "severity" equivalent
	C string // error code/key string
}

type LogEntry added in v1.0.6

type LogEntry struct {
	Time      time.Time `json:"time"`
	Level     int       `json:"logLevel"`
	Facility  string    `json:"facility"`
	Severity  string    `json:"severity"`
	Code      string    `json:"code"`
	Msg       string    `json:"message"`
	OutputStr string    `json:"outputstr"`
	Printed   bool      `json:"printed"`
}

type LogInterface added in v1.0.15

type LogInterface interface {
	Logify() string
}

type Options

type Options struct {
	DebugLevel int
	MaxLogHist int64
	Behavior   struct {
		PrintTime      bool
		TimeMilli      bool
		Filter         []string
		LogShiftBuffer int
		// contains filtered or unexported fields
	}
}

Jump to

Keyboard shortcuts

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