logger

package module
v0.0.0-...-1b330dc Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None  uint8 = 0
	Debug uint8 = 1
	Info  uint8 = 2
	Warn  uint8 = 3
	Panic uint8 = 4
)
View Source
const (
	BitshieldDefault string = "bitshield"
	CSV              string = "csv"
)

Variables

View Source
var (
	ErrFileNotOpen       error = errors.New("File is not open")
	ErrUnsupportedFormat error = errors.New("unsupported file format")
)

Functions

This section is empty.

Types

type File

type File struct {
	F          *os.File
	Format     string
	Buffer     []byte
	BufferSize int
}

func Open

func Open(file, format string, bufSize int) (*File, error)

func (*File) Clear

func (logFile *File) Clear()

func (*File) Close

func (logFile *File) Close()

func (*File) Flush

func (logFile *File) Flush() error

func (*File) Write

func (logFile *File) Write(log Log) error

type Log

type Log struct {
	Date    string
	Tag     string
	PID     int
	Level   uint8
	Message string
}

Jump to

Keyboard shortcuts

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