Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root logger not hitting #2

Open
topherCantrell opened this issue Jun 29, 2024 · 0 comments
Open

Root logger not hitting #2

topherCantrell opened this issue Jun 29, 2024 · 0 comments

Comments

@topherCantrell
Copy link

topherCantrell commented Jun 29, 2024

I expect all 3 loggers to print. But I'm only getting the 2 children.

Code:

package main

import (
	"github.com/Sirupsen/logrus"
	"github.com/zenoss/logri"
)

func main() {
	pkglog := logri.GetLogger("package")
	cmplog := logri.GetLogger("package.component")
	subcmplog := logri.GetLogger("package.component.subcomponent")

	pkglog.SetLevel(logrus.DebugLevel, true)

	pkglog.Debug"This is a debug message pkg")
	cmplog.Debug("This is a debug message cmp")
	subcmplog.Debug("This is a debug message subcmp")
}

Output:

PS C:\git\firefly-svc-nats-http-bridge\cmd\server> go run main.go

time="2024-06-29T16:32:27-05:00" level=debug msg="This is a debug message cmp" logger=package.component
time="2024-06-29T16:32:27-05:00" level=debug msg="This is a debug message subcmp" logger=package.component.subcomponent

PS C:\git\firefly-svc-nats-http-bridge\cmd\server>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant