This is one of the things I've been working on. It enables multi window logging so you can organise and more easily read the logs you create in your code.
You can :
LogServerClient is now a b4xlib which should work on all platforms. It has a different name to the previous libraries to avoid confusion.
The LogServer runs on a PC (untested on a MAC but please let me know) and is provided as a jar file which you should open before running the app containing the client module. Nothing bad will happen if you run the app without opening the server first, all messages will be sent to the IDE log window, you will get a "java.net.ConnectException: Connection refused: connect." message which you can ignore.
If you lose connection while an app is running for any reason, any subsequent messages will be sent to the IDE log.
The client module depends on:
jNetwork / Network
jRandomAccessFile / RandomAccessFile
jXUI / XUI (except NonUI B4j apps)
JavaObject
Limitations:
Documentation: available as Html file on dropbox
Downloads:
Examples for B4a and B4j and single b4xlib file are attached.
The LogServer jar is too big to upload to the forum, you can get it from my Dropbox here : LogServer download
Update V2:
Supports multiple connections from any platform
The library is now a distributed as a B4xlib and should work on b4j, b4a and b4i as I have removed threading and java specific code.
The only downside is that if you send a lot of messages while the device is connecting, they are handled by a timer instead of a thread, which makes the updates a little slower. To negate this, there is a Stream_Ready callback that will fire when the stream is ready, if you wait for that as in the examples, then the slow down will not occur.
Update V2.10 Client library Updated to work with Non_UI apps in Java 9+
Update V2.2
Don't forget to download the new version of LogServer.jar from the Dropbox link above and set the IP address of the server in b4a / b4i and also in b4j if you are running the server on a different computer.
If you test it on B4i, please let me know the results.
Please try it out and let me know how you get on with it.
Enjoy.
You can :
- create multiple dockable LogAreas (windows) the last area created will become the current default.
- SwitchTo another existing area to make that the default.
- Send a message to a specific log area
- Log in Color
- Write all messages simultaneously to a file for specified LogAreas
- Filter or Find messages in each LogArea
- Copy messages to the clipboard (select then ctrl-c)
- Turn on and off logging of the messages to the IDE log (LogLocal)
- Configure the output in the Server app (Edit/UserOptions) - Font size, Background color, Port number max message and a few more.
- Run the server app on a separate computer.
LogServerClient is now a b4xlib which should work on all platforms. It has a different name to the previous libraries to avoid confusion.
The LogServer runs on a PC (untested on a MAC but please let me know) and is provided as a jar file which you should open before running the app containing the client module. Nothing bad will happen if you run the app without opening the server first, all messages will be sent to the IDE log window, you will get a "java.net.ConnectException: Connection refused: connect." message which you can ignore.
If you lose connection while an app is running for any reason, any subsequent messages will be sent to the IDE log.
The client module depends on:
jNetwork / Network
jRandomAccessFile / RandomAccessFile
jXUI / XUI (except NonUI B4j apps)
JavaObject
Limitations:
- This is not a replacement for the IDE log, it cannot show application errors.
- The Gui slows down once there are about 3000 items in a LogArea, which is why the limit is initially set to that in the User Options. If you experience a slow Gui, or are running it on an old slow computer you can try limiting this further.
Documentation: available as Html file on dropbox
Downloads:
Examples for B4a and B4j and single b4xlib file are attached.
The LogServer jar is too big to upload to the forum, you can get it from my Dropbox here : LogServer download
Update V2:
Supports multiple connections from any platform
The library is now a distributed as a B4xlib and should work on b4j, b4a and b4i as I have removed threading and java specific code.
The only downside is that if you send a lot of messages while the device is connecting, they are handled by a timer instead of a thread, which makes the updates a little slower. To negate this, there is a Stream_Ready callback that will fire when the stream is ready, if you wait for that as in the examples, then the slow down will not occur.
Update V2.10 Client library Updated to work with Non_UI apps in Java 9+
Update V2.2
- Added ServertimeStamp
- Added CircularProgressBar - Erel's Circular Progress Bar
- Added TimePlot - Based on Klaus's xChart V4.2
- Added LedMatrix
- Added HexView
- Improved tcp connection process
- Added IsConnected method to LogServerClient
Don't forget to download the new version of LogServer.jar from the Dropbox link above and set the IP address of the server in b4a / b4i and also in b4j if you are running the server on a different computer.
If you test it on B4i, please let me know the results.
Please try it out and let me know how you get on with it.
Enjoy.
Attachments
Last edited: