log

package
v0.0.0-...-929fa59 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PREFIX_ERR             = "ERR"
	PREFIX_OUT             = "OUT"
	PREFIX_WARN            = "WARN"
	PREFIX_UNCATCHABLE_ERR = "UNCATCHABLE ERR"

	LOGOUT_BASE = "{%s} (%s) %s\n"
	LOGERR_BASE = "{%s} (%s) %s: %s\n"

	INTERNAL_SRV_ERR = "Internal server error"
	BAD_REQUEST      = "Bad request"
)

TODO: Abandon this file. All functions here are applied within the Helper struct.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	CallerName string
	RespW      http.ResponseWriter
}

func MakeReporter

func MakeReporter(callerName string, r http.ResponseWriter) *Reporter

func (*Reporter) Err

func (r *Reporter) Err(msg string, err error)

func (*Reporter) Fatal

func (r *Reporter) Fatal(msg string, err error)

func (*Reporter) InternalErr

func (r *Reporter) InternalErr(msg string, err error)

func (*Reporter) InternalFatal

func (r *Reporter) InternalFatal(msg string, err error)

func (*Reporter) Out

func (r *Reporter) Out(msg string)

func (*Reporter) Uncatchable

func (r *Reporter) Uncatchable(msg string)

func (*Reporter) Warn

func (r *Reporter) Warn(msg string)

Jump to

Keyboard shortcuts

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