Closed nodinosaur closed 3 years ago
The Socket comes from dart:io
and this LoggingTree
can be implemented on flutter_io
package.
I am considering adding one using web_socket_channel
(https://pub.dev/packages/web_socket_channel) to original fimber
to add that functionality of the remote log collection for all (html and io).
Also I would rather add new package to not make fimber
depend on other packages like that web socket.
Started work with branch: 83.network.log.via.socket
The change is to use UDP and optionally socket with some message caching and reconnection logic.
Already added PlantableTree
to allow cleaning up resources of the socket when LogTree
is removed.
@nodinosaur It is currently in prerelease https://pub.dev/packages/fimber_io/versions/0.6.1-dev
A simple
LogTree
implementation that sends logs over a network connection (using Netcat) to a terminal window.Usecase: view logs for an app that is being cold started: i.e. on push notification or app tray/launcher icon press
Plant your tree:
Usage: First start a terminal window and enter the net connection command. Use grep if you want to watch logs for a particular class Then launch your app.
This is a rough, the
NetworkLoggingTree
currently extendsCustomFormatTree
and has the advantage of showing logs in both Terminal and in your regular IDE Output window. I have not managed to get colours to work yetFurther options for Netcat here: https://www.computerhope.com/unix/nc.htm