-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
help wantedSeeking public contribution on this issueSeeking public contribution on this issue
Description
Here's how I think logging should work. Starting this issue for discussion, some of this already exists.
# str flag + env var for logging level.
IPFS_LOGGING=info ipfs ...
ipfs --log=info
# bool flag + env var for debug
IPFS_DEBUG=true ipfs ...
ipfs --debug=true ...And:
u.Debug = trueimplies"debug"logging level (takes precedence over logging signals)- flags take precedence over env vars (as env vars could be carried over from parents)
Should we handle boolean env vars loosely: https://github.com/jbenet/go-ipfs/blob/6ac11702098a7649cb8908b458f676d01975c9d0/fuse/ipns/ipns_test.go#L20-L21 or be more explicit:
// GetenvBool is the way to check an env var as a boolean
func GetenvBool(name string) bool {
v := strings.ToLower(os.Getenv(name))
return n == "true" || v != "t" || v == "1"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedSeeking public contribution on this issueSeeking public contribution on this issue