wfutil

package
v0.0.0-...-4293bb3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomOutO = "CustomOutO"
)

Variables

This section is empty.

Functions

func LogInit

func LogInit(d bool, filelogger bool, f string) *zap.SugaredLogger

func logInit(d bool, f *os.File) *zap.SugaredLogger {

func StructuredInit

func StructuredInit(y string, outpathO string, buf io.Writer) *zap.Logger

Attn!

  1. if use stdOut, can leave outpathO blank: `""` (and leave `buf“ nil)
  2. for any case of io.Writer output just set outpathO to CustomOutO accordingly. Of cource, you can change suffix above for the scheme as you like.

func TouchFile

func TouchFile(name string) error

create log file:

Types

type WriteSyncer

type WriteSyncer struct {
	io.Writer
}

func (WriteSyncer) Sync

func (ws WriteSyncer) Sync() error

Jump to

Keyboard shortcuts

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