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

Debug and trace don't seem to work? #13

Open
chucker opened this issue Nov 17, 2022 · 0 comments
Open

Debug and trace don't seem to work? #13

chucker opened this issue Nov 17, 2022 · 0 comments

Comments

@chucker
Copy link

chucker commented Nov 17, 2022

(Maybe I'm missing a step where I need to tell swift-log not to swallow them?)

Given the following code:

		logger.debug("debug")
		logger.info("info")
		logger.critical("critical")
		logger.error("error")
		logger.notice("notice")
		logger.trace("trace")
		logger.warning("warning")

And a Terminal call to log stream:

log stream --predicate '(subsystem contains "me.chucker")' --debug

I get:

Filtering the log data using "subsystem CONTAINS "me.chucker""
Timestamp                       Thread     Type        Activity             PID    TTL  
2022-11-18 00:19:08.588877+0100 0x147f90   Info        0x0                  8955   0    MyApp: [me.chucker.MyApp:] info
2022-11-18 00:19:08.588932+0100 0x147f90   Fault       0x290b3b             8955   0    MyApp: [me.chucker.MyApp:] critical
2022-11-18 00:19:08.588954+0100 0x147f90   Error       0x0                  8955   0    MyApp: [me.chucker.MyApp:] error
2022-11-18 00:19:08.588967+0100 0x147f90   Default     0x0                  8955   0    MyApp: [me.chucker.MyApp:] notice
2022-11-18 00:19:08.588978+0100 0x147f90   Info        0x0                  8955   0    MyApp: [me.chucker.MyApp:] warning

Which is to say… it works as expected for types info and above, but not for debug, even though I explicitly ask log stream to show debug messages. Same if I go to the Console app and do Action → Include Debug Messages.

I know the --debug flag works because ignoring my current app, this:

log stream --predicate 'messageType == "debug"'

…will return nothing, whereas this:

log stream --predicate 'messageType == "debug"' --debug

…will return a veritable firehose (but nothing from my app).

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