proxy.golang.org : github.com/inkel/slogflag
Package slogflag implements command-line flag parsing for slog.Level variables. Define flags using slogflag.Level. This declares a slog.Level flag, -log-level, stored in the pointer level, with type *slog.Level: If you like, you can bind the flag to a variable using the slogflag.LevelVar function: After all the flags are defined, call flag.Parse as usual. Then you can set the log level of your slog.Logger like this:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/inkel/slogflag
Keywords:
go
, go-package
, golang
, logging
License: MIT
Latest release: over 1 year ago
First release: over 1 year ago
Namespace: github.com/inkel
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 25 days ago