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.
Click to show internal directories.
Click to hide internal directories.