Twitter
There is a setting in the log4j framework that allows you to log the exact location of where the logger was invoked (I’d provide a link to the related documentation, but I can’t find it; the lo4j site is a horrible mess). I always wondered how that works, here’s how:
public class Invoker { public static void main(String[] args) { System.out.println("Invoked from: " + invoker()); System.out.println("A bit more indirect: " + test()); } private static String test() { return invoker(); } public static String invoker() { try { throw new RuntimeException(); } catch(RuntimeException e) { return e.getStackTrace()[1].toString(); } } }
The output format matches the Exception#printStackTrace format, so that you can click on the result in the Eclipse console and it opens the file at the correct line:
Invoked from: Invoker.main(Invoker.java:4) A bit more indirect: Invoker.test(Invoker.java:9)
I’m thinking about rebooting this blog: Create a new .com site with my jQuery stuff and posting about technical/programming stuff there, while relaunching this site into a german blog, posting about non-technical stuff, music, politics…
If you read this, please let me know what you think: leave a comment, or send me a mail at joern.zaefferer@gmail.com
Hier sind drei Artikel auf zeit.de, ich die allesamt sehe empfehlen kann.
Zum einen ein Streitgespräch mit Günter Wallraff, zu dessen Buch Aus der schönen neuen Welt (ebenfalls sehr empfehlenswert) und den zugehörigen Film, Schwarz auf Weiss. Auch die am Ende erwähnte Titanic-Satire dazu lesen!
Dann wäre da ein Artikel zur Sozialdebatte, auch wenn in der URL Armutsdebatte steht. Es sollte schwer fallen, dem uneingeschränkt zuzustimmen, aber als Denkanstoß sehr gut.
Wieder was ganz anderes: Der Bericht von Jemand, der wegen das Papstes aus der Kirche austreten will, und dies zunächst mit Pfarrern aus ganz Deutschland bei der Beichte bespricht.