logutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enable

func Enable(t Type)

Enable enables the output of some types of verbose log.

func EnableAll

func EnableAll()

func InitLogger

func InitLogger()

InitLogger initialize the global logger

func IsEnableDevice

func IsEnableDevice() bool

IsEnableDevice checks if device debug logs enabled.

func IsEnablePeer

func IsEnablePeer() bool

IsEnablePeer checks if packet between peers debug logs enabled.

func IsEnablePortal

func IsEnablePortal() bool

IsEnablePortal checks if http request between portal and node debug logs enabled.

func IsEnableRelay

func IsEnableRelay() bool

IsEnableRelay checks if packet between relay and node device debug logs enabled.

func Level

func Level() zapcore.Level

Level returns the log level corresponding to the verbosity level

Types

type Type

type Type byte
const (
	// DebugPortalLevel indicates HTTP request between node and gateway
	DebugPortalLevel Type = 0
	// DebugRelayPacket indicates UDP packet message between node and gateway
	DebugRelayPacket Type = 1
	// DebugPeerPacket indicates UDP packet message between peers
	DebugPeerPacket Type = 2
	// DebugDevicePacket indicates Packets read from/write into virtual device
	DebugDevicePacket Type = 3
)

Jump to

Keyboard shortcuts

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