logformatter

package
v1.11.2-rc1-wikiprov Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(app string, utc bool)

Types

type LogWriter

type LogWriter struct {
	Appname string
	UTC     bool
}

func (*LogWriter) Write

func (lw *LogWriter) Write(logString []byte) (int, error)

Write enables us to format a logging prefix for the application. The text will appear before the log message output by the caller.

e.g.

`// 2023-11-27 11:36:57 ERROR :: golang-app:100:main() :: this is an error message, ...some diagnosis`

Jump to

Keyboard shortcuts

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