logd

package
v0.0.0-...-5b6618e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultWriter     *os.File
	DefaultLogDir     = "./log"
	DefaultDateFormat = "2006-01-02"
	DefaultLogFlags   = log.Ltime | log.Lshortfile
	DefaultLogLevel   = slog.LevelDebug
)

Functions

func HandleInterrupt

func HandleInterrupt()

func InitLogger

func InitLogger()

func RegisterHandlers

func RegisterHandlers(e *echo.Group)

func ShowCurrentLogs

func ShowCurrentLogs(c echo.Context) error

ShowCurrentLogs godoc

@Summary		Show logs of current date
@Description	Generate url with log path and date. Then redirect to it.
@Tags			log
@Produce		html
@Success		200	{object}	string "{ log }<br/>{ log }<br/>{ log }"

@Router			/logs/current [GET]

func ShowLogs

func ShowLogs(c echo.Context) error

ShowLogs godoc

@Summary		List all log paths to see
@Description	Find logs in log directory and link to them. List them and show to user for redirecting to suitable log by date.
@Tags			log
@Produce		html
@Success		200	{object}	string "<a href="2023-11-28.log">2023-11-28.log</a><br><a href="2023-11-29.log">2023-11-29.log</a><br>"

@Router			/logs/list [GET]

Types

This section is empty.

Jump to

Keyboard shortcuts

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