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

Don't log if nothing is wrong #186

Closed
philippejadin opened this issue Nov 30, 2015 · 5 comments
Closed

Don't log if nothing is wrong #186

philippejadin opened this issue Nov 30, 2015 · 5 comments
Milestone

Comments

@philippejadin
Copy link

Here : https://github.com/VentureCraft/revisionable/blob/master/src/Venturecraft/Revisionable/Revision.php#L175

This line fills the log with an "info" that is probably not useful.
I get this for each display of history :

production.INFO: Revisionable: exception 'BadMethodCallException' with message 'Call to undefined method Illuminate\Database\Query\Builder::getRevisionUnknownString()' in /[...]/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2071

This might fill the log quickly. Or is it the purpose of log@ info level?

@philippejadin
Copy link
Author

Or maybe, it is because a related model has not the revisionable trait. In this case I'd consider this as a bug.
Anyone has insight on this?

@ghost
Copy link

ghost commented May 2, 2016

I realize this is an old issue, but since it's still marked as open...

I have exactly the same question. Is this a problem that I need to address in the code in some way? Or do I simply need to change my overall log level setting?

@Gummibeer
Copy link

It seems that it tries to call the method on a model that doesn't use the trait.
So it could be that you can solve it by using the trait in the related model.

@philippejadin
Copy link
Author

...which probably means it's a bug :-) But unfortunately I have no idea how to fix it

@Gummibeer
Copy link

A simple method_exists() should solve it.

stierler pushed a commit that referenced this issue May 22, 2017
@stierler stierler added this to the 1.29.0 milestone May 22, 2017
stierler pushed a commit that referenced this issue May 22, 2017
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

3 participants