dvlog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

********************************************************************** MicroCore Copyright 2017 - 2020 by Danyil Dobryvechir ([email protected] [email protected]) ***********************************************************************

********************************************************************** MicroCore Copyright 2017 - 2020 by Danyil Dobryvechir ([email protected] [email protected]) ***********************************************************************

Index

Constants

View Source
const (
	LogFatal = iota
	LogError
	LogWarning
	LogInfo
	LogDetail
	LogDebug
	LogTrace
)

Variables

View Source
var CurrentLogLevel = LogError
View Source
var CurrentNamespace string
View Source
var CurrentRootFolder string
View Source
var StartTime = time.Now().Unix() - 1520000000

Functions

func CheckDvLogStreamToFile

func CheckDvLogStreamToFile(parameters map[string]string)

func CleanEOL

func CleanEOL(dat []byte)

func EnsureDirForFileExists

func EnsureDirForFileExists(fileName string) bool

func EnsureFolder

func EnsureFolder(folder string) string

func EnsureFolderCheck

func EnsureFolderCheck(folder string) (string, bool)

func EnsureSubFolderCheck

func EnsureSubFolderCheck(folderUser string, folderSub string) (folder string, res bool)

func EnsureSubFolderCritical

func EnsureSubFolderCritical(folderUser string, folderSub string) string

func FindConfigFile

func FindConfigFile(folder string, name string) (fileName string, err error)

func FlushStream

func FlushStream()

func FormErrorMessage

func FormErrorMessage(err string) []byte

func GetCurrentTimeStampForLog

func GetCurrentTimeStampForLog() []byte

func GetLogLevelByDefinition

func GetLogLevelByDefinition(logLevel string, defaultLevel int) int

func GetNextUniqueNumber

func GetNextUniqueNumber() int64

func GetPrincipalFolder

func GetPrincipalFolder(ensure bool) string

func GetSafeFileName

func GetSafeFileName(dat string) string

func GetSubFolder

func GetSubFolder(mainFolder string, subFolder string) string

func GetTaskFolder

func GetTaskFolder() string

func GetTaskSubFolder

func GetTaskSubFolder(subFolder string) string

func GetTemporaryFileName

func GetTemporaryFileName() string

func LogLevelFromProperties

func LogLevelFromProperties(parameters map[string]string, propertyName string, defLevel int) int

func LogLevelToInt

func LogLevelToInt(levelWord string) (level int, ok bool)

func Printf

func Printf(formatShort, formatFull string, a ...interface{})

func PrintfError

func PrintfError(format string, a ...interface{})

func PrintfFullOnly

func PrintfFullOnly(format string, a ...interface{})

func Println

func Println(short string, full string)

func PrintlnError

func PrintlnError(s string)

func PrintlnToStream

func PrintlnToStream(s string) (err error)

func SetCurrentNamespace

func SetCurrentNamespace(namespace string)

func SetLogLevel

func SetLogLevel(logLevel string)

func StartingLogFile

func StartingLogFile()

func WriteRequestToLog

func WriteRequestToLog(body []byte, r *http.Request) string

func WriteResponseToLog

func WriteResponseToLog(logFile string, resp *http.Response, body []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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