logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logging provides common logging functionality.

Index

Constants

View Source
const (
	FlowLevel      = 2
	FnDeclLevel    = 3
	ResultLevel    = 4
	SpamLevel      = 5
	CrazySpamLevel = 6
)

Variables

This section is empty.

Functions

func FnName

func FnName() string

FnName returns the calling function name, e.g. "SomeFunction()". This is useful for logging a function name.

Example:

if glog.V(logging.FnDeclLevel) {
  glog.Info(logging.FnName())
}

func FnNameWithArgs

func FnNameWithArgs(format string, args ...interface{}) string

FnNameWithArgs returns the calling function name, with argument values, e.g. "SomeFunction(arg1, arg2)". This is useful for logging function calls with arguments.

Example:

if glog.V(logging.FnDeclLevel) {
  glog.Info(logging.FnNameWithArgs(arg1, arg2, arg3))
}

func V

func V(level glog.Level) glog.Verbose

Types

This section is empty.

Jump to

Keyboard shortcuts

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