logutil

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package logutil implements utilities for recording log output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTeeWriter added in v0.12.0

func CreateTeeWriter(writer io.Writer, logPath string, maxSize int) (io.Writer, error)

CreateTeeWriter tees out output to a file path specified by logPath up to a max limit. Creates necessary directories for the specified logpath if they don't exist.

func NewWriterToFile

func NewWriterToFile(maxSize int, path string) (io.Writer, error)

NewWriterToFile creates a Writer that writes out output to a file path up to a maximum limit maxSize.

func TeeOutput

func TeeOutput(writer io.Writer, maxSize int) (io.Writer, error)

TeeOutput tees out output to a file path specified by env var `UROOT_LOG_PATH` and sets the log output to the newly created writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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