I’m running a small minecraft server with this command: /usr/lib/jvm/java-6-sun/bin/java -Xmx2048M -Xms2048M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar minecraft_server.jar
I’m finding myself wanting to see more from the server than the author intentionally writes to the console. So I come to you asking if you know of a way to enable some sort of debug logging and output it to a fifo. I will then watch that fifo using swatch and trigger events that match a regular expression.
Does anyone know of a way to cause java to dump everything it’s doing to a fifo during runtime?
As a commenter said, you can’t make an application log more than it is intended to. Although Java (the runtime itself) might have logging options (I don’t know), that won’t help you. If you’re looking for something like “killed a monster”, that is an application-level concept, not something that Java knows about. And if the application isn’t logging it, and you don’t have the source, then there’s not much you’re going to be able to do.
The only instrumentation you even could potentially do would be at the virtual machine level, but that’s WAY too low level for what you’re talking about.