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

Unclear error message on invalid Scout log level #105

Closed
cschneid opened this issue Oct 23, 2019 · 4 comments · Fixed by #106
Closed

Unclear error message on invalid Scout log level #105

cschneid opened this issue Oct 23, 2019 · 4 comments · Fixed by #106
Assignees
Labels
enhancement New feature or request

Comments

@cschneid
Copy link
Contributor

remote: [2019-10-23 02:08:27] production.ERROR: Expected the key "warn" to exist. {"exception":"[object] (InvalidArgumentException(code: 0): Expected the key "warn" to exist. at /tmp/build_3675d0708815f595c355f5bbcf66d8d8/vendor/webmozart/assert/src/Assert.php:1696)
remote: [stacktrace]
remote: #0 /tmp/build_3675d0708815f595c355f5bbcf66d8d8/vendor/webmozart/assert/src/Assert.php(1417): Webmozart\Assert\Assert::reportInvalidArgument('Expected the ke...')
remote: #1 /tmp/build_3675d0708815f595c355f5bbcf66d8d8/vendor/scoutapp/scout-apm-php/src/Logger/FilteredLogLevelDecorator.php(44): Webmozart\Assert\Assert::keyExists(Array, 'warn')

@cschneid
Copy link
Contributor Author

I had SCOUT_LOG_LEVEL set to WARN, but that error is super opaque on what's happening.

Also, is 'warn' not a valid log level? or is it the all caps that tripped it up?

@asgrim
Copy link
Collaborator

asgrim commented Oct 23, 2019

Happy to rename the error; but the key should indeed be warning not warn, see:

https://github.com/php-fig/log/blob/master/Psr/Log/LogLevel.php

These are the standardised log levels in PHP...

@asgrim asgrim self-assigned this Oct 23, 2019
@asgrim asgrim added the enhancement New feature or request label Oct 23, 2019
@asgrim asgrim added this to the 0.3.0 milestone Oct 23, 2019
@cschneid
Copy link
Contributor Author

It'd be great if we can clarify the error message and give the user a pointer on how to fix it.

@cschneid cschneid changed the title Fails to deploy to Heroku due to assert error Unclear error message on invalid Scout log level Oct 23, 2019
@asgrim
Copy link
Collaborator

asgrim commented Oct 23, 2019

Yup, I can definitely do that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants