write
Writes an object to the specified channel.
If the channel is not yet registered with this writer, it will be automatically added before writing the object. The object is serialized using the channel's schema and written as a message entry to the log file.
Parameters
The type of the object being written
The channel to write to
The object to write
Writes an object to a channel identified by name.
This method provides a dynamic way to write objects when the channel type is not known at compile time. If a channel with the specified name exists, the object is written to that channel. If no such channel exists, a new channel is created automatically using schema inference from the object's class.
Warning: This method uses type erasure and runtime casting, so type safety is not guaranteed. Use the typed write method when possible.
Parameters
The name of the channel to write to
The object to write