1
0
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:
Jordi Boggiano
2016-05-26 21:13:52 +01:00
parent 017aa2cb75
commit af7c0a7bda
2 changed files with 37 additions and 5 deletions

View File

@@ -43,4 +43,11 @@ abstract class Handler implements HandlerInterface
// do nothing
}
}
public function __sleep()
{
$this->close();
return array_keys(get_object_vars($this));
}
}