mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 17:46:09 +02:00
Make handlers more serializable by default by having them close() before sleeping, fixes #365
This commit is contained in:
@@ -43,4 +43,11 @@ abstract class Handler implements HandlerInterface
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
$this->close();
|
||||
|
||||
return array_keys(get_object_vars($this));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user