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

Logger and persistence problem #48

Closed
BasvanH opened this issue Nov 5, 2019 · 1 comment
Closed

Logger and persistence problem #48

BasvanH opened this issue Nov 5, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@BasvanH
Copy link
Contributor

BasvanH commented Nov 5, 2019

I have extended the Logger of Rubix to Laravel Log facade. This works very well except when you start to use persistence.

$estimator->setLogger(new class extends Logger {
  public function log($level, $message, array $context = array())
   {
     Log::$level($message, $context);
   }
});

When I try to save the estimator, I get this error:
Serialization of 'class@anonymous' is not allowed
vendor/rubix/ml/src/Persisters/Serializers/Native.php:26

Can't seem to figure out why this is happening. Logger should not be near the persistence I think.

@BasvanH
Copy link
Contributor Author

BasvanH commented Nov 5, 2019

Duplicate to #42 due to github outage.

@BasvanH BasvanH closed this as completed Nov 5, 2019
@andrewdalpino andrewdalpino added the duplicate This issue or pull request already exists label Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants