logging

package
v0.0.0-...-0c1943d Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package logging holds the implementation for adapter logs.

Index

Constants

View Source
const (
	TEXT = "TEXT"
	JSON = "JSON"
)

Log Formalization Constants

View Source
const (
	BLOCKER  = "Blocker"
	CRITICAL = "Critical"
	MAJOR    = "Major"
	MINOR    = "Minor"
	TRIVIAL  = "Trivial"
	DEFAULT  = "Default"
)

Log (Error) severity level constants

View Source
const (
	SEVERITY  = "severity"
	ERRORCODE = "error_code"
)

Error Log attribute name constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDetails

type ErrorDetails struct {
	Message   string
	Severity  string
	ErrorCode int
}

ErrorDetails used to keep error details for error logs

type Log

type Log struct {
	*logrus.Logger
}

Log represents the extended type of logrus.logger

func InitPackageLogger

func InitPackageLogger(pkgName string) Log

InitPackageLogger initialises the package loggers for given package name. If the package log level is defined in the log_config.toml file, it override the root log level.

func (*Log) ErrorC

func (l *Log) ErrorC(e ErrorDetails)

ErrorC can be used for formal error logs

Jump to

Keyboard shortcuts

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