Serialization Docs: add info about adding a logger (#22618)
This commit is contained in:
parent
16014c4d1f
commit
aa5a27182e
2 changed files with 10 additions and 0 deletions
|
|
@ -21,6 +21,11 @@ public class SerializationDocTest {
|
|||
//#my-own-serializer
|
||||
public class MyOwnSerializer extends JSerializer {
|
||||
|
||||
// If you need logging here, introduce a constructor that takes an ExtendedActorSystem.
|
||||
// public MyOwnSerializer(ExtendedActorSystem actorSystem)
|
||||
// Get a logger using:
|
||||
// private final LoggingAdapter logger = Logging.getLogger(actorSystem, this);
|
||||
|
||||
// This is whether "fromBinary" requires a "clazz" or not
|
||||
@Override public boolean includeManifest() {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@ package docs.serialization {
|
|||
//#my-own-serializer
|
||||
class MyOwnSerializer extends Serializer {
|
||||
|
||||
// If you need logging here, introduce a constructor that takes an ExtendedActorSystem.
|
||||
// class MyOwnSerializer(actorSystem: ExtendedActorSystem) extends Serializer
|
||||
// Get a logger using:
|
||||
// private val logger = Logging(actorSystem, this)
|
||||
|
||||
// This is whether "fromBinary" requires a "clazz" or not
|
||||
def includeManifest: Boolean = true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue