Beanmill
[flash http://blogs.cismet.de/beanmill.swf w=1016 h=839 preview=force mode=3 ]A component to visualize Log4J, JSR47 Logging Events (over Sockets) in your favorite IDE. Featurelist of this component:
- Jump to the logmessages in the editor (Doubleclick in the table)
- Jump to stacktrace elements in the editor (Single Click the links)
- Filter with regular expressions
- Filter with your editor selection on the fly
- Show logmessages from certain classes (controlled out of the editor context menu)
- Export/Import logmessages via XML
- …
The code is based on the Lumbermill Log Viewer.
Beanmill has it own updatecenter under:
Beanmill has its own updatecenters under: ![]()
http://www.cismet.de/updatecenters/beanmill6/updates.xml for 6.0 and 6.1
and
http://www.cismet.de/updatecenters/beanmill6_5/updates.xml for 6.5 and 6.7
(Just copy the link and click the add-Button of the Plugin-Dialog and click on Update) Download the sources here.
Hey,
I’m looking forward to using this plugin. For some reason I can’t seem how to get the file ( logfile.log4j ) file to show in beanmill. I’m opening up the logfile by the “Import Events” button -> selecting the log fil and opening it. Nothing shows.
Am i missing something? a specific PatternLayout?
Thanks for you time and effort with this plugin.
Looks nice! Is the source available for this?
Hey Ryan, sorry for the late answer. The import action in the plugin is only compatible with the export action of it. We are working on an import functionality for regular xml logs with the default pattern. Till we complete that you have to use the socket appender to show your logs in beanmill.
Hi Tom, I put the sources online.
Hi,
is Beanmill able to log LogRecords sent by java.util.logging.SocketHandler?
Because i get several Exceptions like this one
java.io.StreamCorruptedException: invalid stream header: 3C3F786D
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
at java.io.ObjectInputStream.(ObjectInputStream.java:280)
at com.traxel.lumbermill.event.EventListenerServer$SocketListener.(EventListenerServer.java:60)
at com.traxel.lumbermill.event.EventListenerServer.listen(EventListenerServer.java:235)
at com.traxel.lumbermill.event.EventListenerServer.run(EventListenerServer.java:167)
i tested it with LogFeeder (http://www.puzzlecode.com/puzzlecode/logfeeder) and that works. It would be great if i could grab the LogRecords direct in the ide.
Roland
Hi Roland, I’ll put an example online shortly. But I really recommend the use of log4j. There are some cool features (click on a log and jump to the line in the code, use stacktraces as links to the code) in the plugin, which doesn’t work with java.util.logging.
Regards
Thorsten
works fine
cool
Is this working in NB 6.1 beta yet? I can’t seem to use it.
Sorry… got it working. I had only installed the log4j module and not the viewer itself.
Thank you for bringing lumbermill in very usable form to netbeans. Work like a charm.
For us it was impuls to reconsider all logging implementations we used.
After few hours of testing and consulting we finally ended using SLF4J (http://www.slf4j.org/). SLF4J brings logging to whole new level by wraping somtimes problematic log4j and even more problematic commons-logging.
As we need to use standard java logging in tomcat 6, SLF4J merged all log messages to one (user choice) adapter. Our choice was slf4j-jdk14 and by using own implementation of SocketHandler we managed to deliver all log messages to beanmill.
Many thanks again for best java log viewing solution!
Regards
Ondrej Burianek
Can you please make it work with NB 6.7 ?
We made it work with 6.7
.
Just uninstall the old beanmill plugin if you already installed it and use this update center url:
http://www.cismet.de/updatecenters/beanmill6_5/updates.xml
Install Beanmill an enjoy
A couple of small updates:
Just look into the preferences:
* You can enable Beanmill to show the log-messages when pressing a certain modifier key (CTRL, …)
* render the log message as html or as raw text (or both if you want) (this feature is usefull if there is XML in your log messages)
Please rate it, if you like it.
Awesome! I came across this after already trying the basic Lumbermill plugin, but this is way better. Double-clicking the table doesn’t seem to do anything, but I can live with that. Thanks for providing it!
Hi,
I wrote Lumbermill. Very happy to see that you’ve picked it up! Keep up the great work — what you’ve done is exactly why Open Source rules.
Bob
What am I missing? I run my current code and I get log4j messages in the standard netbeans output console, but nothing (logging is ’started’ – green play button) shows up in the beanmill window? I downloaded via the update center and am using netbeans 6.8. Do I have to add some sort of appender or otherwise modify my log4j config? Does anyone have an example? Thanks!
Hi Jason,
you need a socket appender, since the lumbermill plugin catches log-messages that come via network sockets.
just add this to your log4j.config
log4j.rootLogger=sockets
log4j.appender.sockets=org.apache.log4j.net.SocketAppender
log4j.appender.sockets.remoteHost=localhost
log4j.appender.sockets.port=4445
log4j.appender.sockets.locationInfo=true
best regards
Thorsten
Awesome Thorsten! That totally worked. Since I was using xml, this was appender:
<appender name=”SOCKET” class=”org.apache.log4j.net.SocketAppender”>
<param name=”Port” value=”4445″/>
<param name=”RemoteHost” value=”localhost”/>
<param name=”LocationInfo” value=”true”/>
</appender>
don’t forget to restart IDE after installing and before using Beanmill. Works fine with NB6.9
Do you still maintain the standalone version of (Beanmill Testframe)? There are times when I bring up a standalone version instead of bringing up Netbeans (I use an older version of the Beanmill Testframe when testing outside of Netbeans). I really like the new version of the plugin. Thanks for all of you hard work in keeping this valuable plugin current!
@Chuck Thanks for your comment. We don’t really maintain a standalone version. But I think it’s an idea worth to think about. Kind regards. Thorsten
p.s.: please rate it on netbeans.org if you like it. We need to become a “top10-club” member again