lgx

package
v1.9.67 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 11 Imported by: 0

README

package lgx

Log-Funktionen

- func SetDefault
- func SetProp
- func Fatal
- func Print
- func Printf
- func PrintError
- func PrintfError
- func PrintDebug
- func PrintfDebug
- func PrintInfo
- func PrintfInfo

Documentation

Index

Constants

View Source
const (
	LgxStd   = 0
	LgxGcp   = 1
	LgxDebug = 2
	LgxFile  = 4

	NoTime = "!~!"
	NoNL   = '#'
)

LGX_STD #Standard mit Time LGX_GCP #GoogleCloud ohne Time

Variables

View Source
var (

	// Sversion #wird benoetigt für Usage
	Sversion string

	// PrgName #ProgrammName ohne Ext.
	PrgName string

	// NewLine
	NewLine string
	CRchar  string
	LFchar  string
)
View Source
var IsDebug = false

IsDebug #

Functions

func CreateDirIfNotExist added in v1.7.1

func CreateDirIfNotExist(dirName string) int

CreateDirIfNotExist #

func CurDir added in v1.7.9

func CurDir() string

CurDir #

func DirExists added in v1.7.1

func DirExists(path string) bool

DirExists #

func ExecName added in v1.9.34

func ExecName() string

ExecName #

func Fatal

func Fatal(v ...interface{})

Fatal #

func Fatalf added in v1.9.2

func Fatalf(format string, v ...interface{})

Fatalf #

func FileExists added in v1.7.1

func FileExists(filename string) bool

FileExists #

func Fprintf added in v1.9.26

func Fprintf(w io.Writer, format string, a ...interface{})

Fprintf #

func Fprintln added in v1.9.26

func Fprintln(w io.Writer, a ...interface{})

Fprintln #

func IsDirEmpty added in v1.7.4

func IsDirEmpty(name string) bool

IsDirEmpty #

func LogDir added in v1.9.35

func LogDir() string

LogDir #

func PathBase added in v1.8.1

func PathBase(path string) string

PathBase #

func PathDir added in v1.8.1

func PathDir(path string) string

PathDir #

func PathJoin added in v1.6.6

func PathJoin(elem ...string) string

PathJoin # path.Join ist falsch fuer Windows

func PathSplit added in v1.7.9

func PathSplit(path string) (string, string)

PathSplit # path.Split ist falsch fuer windows

func Print

func Print(v ...interface{}) string

Print #

func PrintDebug

func PrintDebug(v ...interface{})

PrintDebug #

func PrintError

func PrintError(v ...interface{})

PrintError #

func PrintInfo

func PrintInfo(v ...interface{})

PrintInfo #

func PrintNL added in v1.9.4

func PrintNL()

PrintNL #

func PrintStderr added in v1.9.4

func PrintStderr(format string, v ...interface{})

PrintStderr #

func PrintStdout added in v1.9.4

func PrintStdout(format string, v ...interface{})

PrintStdout #

func Printf

func Printf(format string, v ...interface{}) string

Printf #

func PrintfDebug

func PrintfDebug(format string, v ...interface{})

PrintfDebug #

func PrintfError

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

PrintfError #

func PrintfInfo

func PrintfInfo(format string, v ...interface{})

PrintfInfo #

func Println added in v1.6.1

func Println(v ...interface{})

Println #

func SearchEmptyDirs added in v1.7.4

func SearchEmptyDirs(dir string) *[]string

SearchEmptyDirs #

func SearchFilesOlderAs added in v1.7.4

func SearchFilesOlderAs(dir string, days int) *[]string

SearchFilesOlderAs #

func SetOutput added in v1.8.3

func SetOutput(w io.Writer) io.Writer

SetOutput #liefert alten Writer

func SetProp added in v1.4.0

func SetProp(prop int)

SetProp #

func SetVersion added in v1.9.50

func SetVersion(v string)

func Start added in v1.4.2

func Start(w io.Writer, info string, prop int, dir string, pfx string)

Start #

func StartLog added in v1.9.22

func StartLog(out *os.File, ldir string, cpyRight string)

StartLog #Parameter out: os.stderr || os.stdout ldir: z.B.: /usr/firma/log cpyRight: z.B.: "(c) 2020 by Waldemar Urbas" ---------------------------------------------------------- logfile unter {ldir}/{JAMO}/{prgname}{YYMMDD}.log

func Version added in v1.9.22

func Version() string

Version #

Types

type Lgx

type Lgx struct {
	LogDir      string
	LogFileName string
	// contains filtered or unexported fields
}

Lgx #

func Default added in v1.9.47

func Default() *Lgx

Default Logger

func New

func New(out io.Writer, prop int) *Lgx

New #

func (*Lgx) Fatal

func (p *Lgx) Fatal(v ...interface{})

Fatal #

func (*Lgx) Fatalf added in v1.9.2

func (p *Lgx) Fatalf(frm string, v ...interface{})

Fatalf #

func (*Lgx) Print

func (p *Lgx) Print(v ...interface{}) string

Print #

func (*Lgx) Printf

func (p *Lgx) Printf(frm string, v ...interface{}) string

Printf #

func (*Lgx) Println added in v1.6.1

func (p *Lgx) Println(v ...interface{})

Println #

func (*Lgx) SetOutput

func (p *Lgx) SetOutput(w io.Writer) io.Writer

SetOutput #output destination for the logger.

func (*Lgx) Write added in v1.9.47

func (p *Lgx) Write(b []byte) (n int, err error)

Write # as io.Writer // ohne Uhrzeit

Jump to

Keyboard shortcuts

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