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
Log exception causes no logging at all #7305
Comments
Message parameter accepts string, not an instance of Exception. |
Documentation says:
http://www.yiiframework.com/doc-2.0/guide-runtime-logging.html#log-messages |
the problem in this case seems to be that the exception includes a stack trace of the point where it was created. This stack trace also contains pointers to all the object references of functions being called and also their arguments. If this contains a closure at some point (which it does), the var_export here is going to fail: yii2/framework/helpers/BaseVarDumper.php Line 183 in a2e3e3b
The fallback then fails because of a circular reference. |
fixed, thanks for reporting! |
When I call Yii::error(new Exception('asdf')); nothing gets logged. Even other loggings are then ignored for the current request.
Is this a bug? Or not? At least it would be nice if I could easily log an exception. Like described here I'd like to log it easily if possible.
Using Yii2 2.0.2.
The text was updated successfully, but these errors were encountered: