common

package
v0.0.0-...-cbf1392 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package common contains common properties used by the subpackages.

Index

Constants

View Source
const Version = "2.0.1"

Holds version information, when bumping this make sure to bump the released at stamp also.

Variables

View Source
var ReleasedAt = time.Date(releaseYear, releaseMonth, releaseDay, releaseHour, releaseMin, 0, 0, time.UTC)

Functions

func SetLogger

func SetLogger(logger Logger)

func UtcTimeFormat

func UtcTimeFormat(t time.Time) string

Types

type ConsoleLogger

type ConsoleLogger struct {
	LogLevel LogLevel
}

func NewConsoleLogger

func NewConsoleLogger(logLevel LogLevel) *ConsoleLogger

func (ConsoleLogger) Debug

func (this ConsoleLogger) Debug(format string, args ...interface{})

func (ConsoleLogger) Error

func (this ConsoleLogger) Error(format string, args ...interface{})

func (ConsoleLogger) Info

func (this ConsoleLogger) Info(format string, args ...interface{})

func (ConsoleLogger) Notice

func (this ConsoleLogger) Notice(format string, args ...interface{})

func (ConsoleLogger) Trace

func (this ConsoleLogger) Trace(format string, args ...interface{})

func (ConsoleLogger) Warning

func (this ConsoleLogger) Warning(format string, args ...interface{})

type DummyLogger

type DummyLogger struct{}

Dummy Logger does nothing.

func (DummyLogger) Debug

func (this DummyLogger) Debug(format string, args ...interface{})

func (DummyLogger) Error

func (this DummyLogger) Error(format string, args ...interface{})

func (DummyLogger) Info

func (this DummyLogger) Info(format string, args ...interface{})

func (DummyLogger) Notice

func (this DummyLogger) Notice(format string, args ...interface{})

func (DummyLogger) Trace

func (this DummyLogger) Trace(format string, args ...interface{})

func (DummyLogger) Warning

func (this DummyLogger) Warning(format string, args ...interface{})

type LogLevel

type LogLevel int

Simple Console Logger that the tests use.

const (
	LogLevelTrace   LogLevel = 5
	LogLevelDebug   LogLevel = 4
	LogLevelInfo    LogLevel = 3
	LogLevelNotice  LogLevel = 2
	LogLevelWarning LogLevel = 1
	LogLevelError   LogLevel = 0
)

type Logger

type Logger interface {
	Error(format string, args ...interface{})
	Warning(format string, args ...interface{})
	Notice(format string, args ...interface{})
	Info(format string, args ...interface{})
	Debug(format string, args ...interface{})
	Trace(format string, args ...interface{})
}
var Log Logger = DummyLogger{}

Directories

Path Synopsis
The license package helps manage commercial licenses and check if they are valid for the version of unidoc used.
The license package helps manage commercial licenses and check if they are valid for the version of unidoc used.

Jump to

Keyboard shortcuts

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