Sunday, June 10, 2012



Oberstdorf, Germany (June 2012)
Wikipedia Aricle

Schwarzer Rüsselkäfer - Otiorhynchus coecus

Schwarzer Rüsselkäfer - Otiorhynchus coecus

Oberstdorf, Germany (June 2012)
Wikipedia Aricle

Ultra Slow Motion Video of Saw Blade Cutting Steel

Alpine Tubifex Worms

Yesterday, while my cousin and I were hiking in the German alps, we stumbled upon some very bizarre creatures in a small permanent puddle in a cow pasture at around 1500m above sea level. What we at first saw was what looked like a colony of tiny red things undulating together and anchored to the silty bottom of the puddle.

After poking the moving red mat, it quickly receded and disappeared under the surface leaving little holes.

Here's what the red things turned out to be - little red worms.

After taking pictures and doing some online research at home, we determined that they must have been Tubifex worms. Here are the links to the German and English Wikipedia pages.

Friday, June 1, 2012

Load a logback.xml Configuration File Programmatically

Today I had a unique situation where I needed to load a logback.xml file programmatically for Logback logging rather than via the standard "from the classpath" way, and here's how I did it. It was quite simple.

The following snippet shows how to load a logging configuration file such as logback.xml programmatically:

LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
try {

  JoranConfigurator configurator = new JoranConfigurator();
  configurator.doConfigure(logFilePath); // loads logback file
} catch (JoranException je) {
  // StatusPrinter will handle this
} catch (Exception ex) {

  ex.printStackTrace(); // Just in case, so we see a stacktrace

StatusPrinter.printInCaseOfErrorsOrWarnings(context); // Internal status data is printed in case of warnings or errors.

Piece of Cake!!