Agile IT! Experience

NFJS / Java World Podcast

User Group Events

May. 20 - St. Paul, Minnesota
The Busy Developer's Guide to Scala by Ted Neward
by Ted Neward
Object Technology User Group - more »
May. 20 - Portland, OR
Design Patterns in Dynamic Languages
by Neal Ford
Portland Java User's Group - more »
May. 29 - Austin, TX
A Thorough Introduction to Groovy
by Jeff Brown
Austin Java Users Group - more »
Jun. 11 - Calgary, AB
Core Groovy
by Andrew Glover
Calgary Java Users Group - more »
Jun. 11 - Dallas, Texas
Grails - Agile Web 2.0 The Easy Way
by Jeff Brown
JavaMUG - more »

Private Events

Blogs

View all Blogs >>
  • Alex Miller

    Sr. Engineer with Terracotta Inc.

    I need something to handle versioning on some local personal stuff. I just want it to run on my own box and have no plans to ever share any... more»

  • Matt Raible

    Creator of AppFuse and author of Spring Live

    Alternative Adult has only posted a couple times in 2008, but his entries have peaked my interest. more»

  • Michael Nygard

    Agile technology leader and dynamicist

    So, I got a Wii for Father's Day last year. It's been a lot of fun to play together with my kids, my wife, and even my parents and in-laws.... more»

  • Mike Levin

    Software Developer specializing in Web2.0 websites

    more»

  • Andrew Glover

    Co-author of "Continuous Integration"

    The weekly bag appears to be a monthly bag at this point, man! more»

  • Ted Neward

    Enterprise, Virtual Machine and Language Wonk

    Recently, a former student asked me, I was in a .NET web services training class that you gave probably 4 or so years ago o more»

  • Howard Lewis Ship

    Creator of Tapestry and HiveMind

    At NFJS Boston last month, I ran into Alex Kotchnev. We had a number of chats about Tapestry and spurring wide adoption. I'm still working... more»

  • Neal Ford

    Application Architect at ThoughtWorks, Inc.

    The shortness of the collective memory of the development world depresses me sometimes. Joel Spolsky has a great blog post from 2004 entitled... more»

  • Venkat Subramaniam

    Founder of Agile Developer, Inc.

    I am looking forward to speaking at the Developer Summit next week in Bangalore. more»

  • Jared Richardson

    Agile coach and co-author of Ship It

    Erlang keeps popping up. This article is about a very practical, real-world integration of Erlang with popular technologies. more»

  • Brian Pontarelli

    Brian Pontarelli - founder of Inversoft

    Got my Lenovo Thinkpad X300 last week and I’ve been using it for development for only a few days. Here are my first impressions: Pr more»

  • Scott Leberknight

    Chief Architect at Near Infinity

    Often when writing unit tests I use Eas yMock to mock dependencies of the class under test. And many times I more»

  • Erik Doernenburg

    Principal Consultant @ Thoughtworks

    Another major improvement of OCMock: it now supports more flexible constraints on the expected arguments. This is done in the Objective-C way... more»

  • Graeme Rocher

    Project Lead of the Grails Project & CTO of G2One

    As I write this JavaOne 08 is being wrapped up and I am horizontal in bed. I somehow managed to get pleurisy and pneumonia a few days before... more»

  • Vladimir Vivien

    Software Engineer / Consultant

    The last day of JavaOne 2008 was heralded by the final General Session where Sun showcased several cool projects. Here are a few you maybe... more»

  • Ryan Shriver

    Business and Technology Consulting

    more»

  • Pramod Sadalage

    Co-author of "Refactoring Databases:Evolutionary Database Development"

    We had a weird requirement on our project recently.. Find all the Rows in All the tables that do not comply with the Constraints more»

  • Kirk Knoernschild

    Software Developer & Mentor

    It’s time to move on and show the simple elegance Spring brings to OSGi development using the HelloWorldSpec sample from the more»

  • Guillaume LaForge

    Groovy Spec Lead & Project Manager

    This is with great pleasure that G2One and the Groovy development team announce the first beta more»

  • Jeff Brown

    G2One Director Of North American Operations - Groovy and Grails Developer

    We have been busy preparing for JavaOne and it is finally almost here. Yay!We hope to see y more»

  • Craig Walls

    Author of Spring in Action

    I read thi s last night, but I have seen this coming for over a year. more»

  • Jason Rudolph

    Author of Getting Started with Grails

    Muness blogged a photographic introductio more»

  • David Bock

    Principal Consultant, CodeSherpas Inc.

    Installing CentOS 5, ImageMagick, and RMagick I don‘t normally blog about obscure, specific technical topics, mainly because 99% of more»

  • Jason Harwig

    Software Engineer

    pre { font-size:80%; } Of the trinity of web technologies, CSS is by far the worst at this stage. It's a language more»

  • Pratik Patel

    Software Architect

    Shake off that St. Patrick's day hang-over by coming over to the AJUG meeting this Tuesday, March 1 more»

  • Pete Behrens

    Organizational Agility Coach

    Marti nig & Associates Methods & Tools group recentl more»

  • Nathaniel Schutta

    Author, speaker, software engineer focused on user interface design.

    Like pretty much any office with more than 3 people, we struggle with the ephemeral concept of more»

  • Joseph Nusairat

    Author of Beginning JBoss Seam & Co-Author of Beginning Groovy & Grails

    Today is the first day of JBoss World, I survived the first three presentations and waiting for the keynote to be  complete to d more»

  • Richard Monson-Haefel

    VP of Developer Relations, Curl Inc.

    more»

  • Brian Sam-Bodden

    Java author, Ruby geek and Open Source Advocate

    In this installment we are going to build the Dashboard page of the Tempo application. T more»

  • Mark Fisher

    Spring Integration Lead

    more»

  • Ron Bodkin

    Chief Software Architect, Quantcast

    I'm looking forward to speaking at The Rich Web Experience conference in San Jose next month. The event runs from September 7th through 9th.... more»

  • Mark Goodwin

    Web Application Security Specialist

    We've already looked at one of the two big problems posed by anti DNS pinning on Java applets; because there's rebinding on the applet and... more»

  • Scott Davis

    Author of "Groovy Recipes" & TDD Expert

    Every time I see a live show at the Denver Botanic more»

  • Brian Goetz

    Author of Java Concurrency in Practice

    Recently, Neal Gafter mused about whether we should consider removing more»

  • Romain Guy

    Java User Interface expert.

    more»

  • Ramnivas Laddad

    Author of AspectJ in Action, Principal at Interface21

    InfoQ.com has published my AOP myths and realities talk recorded at a No Fluff Just Stuff conference. InfoQ.com founded by Floyd Marine more»

  • Keith Donald

    Core Spring Developer, Creator of Spring Web Flow

    A neat "hidden gem" of Spring's container is the ability, from a XML-based bean definition, to automatically populate a bean property of ty... more»

  • David Geary

    Author of Graphic Java Swing and Co-author of Core JSF

    The 2006 NFJS tour kicked off t more»

  • Jason Hunter

    Author of Java Servlet Programming

    I just posted the JDOM 1.1 release for download. This release includes about 20 improvements and bug fixes. more»

  • Stuart Halloway

    CEO of Relevance

    <p>We are happy to announce that <a href='http://www.mckinneystation.co m/'>Geof Dagley</a> has joined the Relev more»


Log level philosophy

Posted by: Alex Miller on 03/25/2008

Eric posted today about log level confusion. As with everything, I have a long-winded and obsessive opinion about this so I thought I’d share it so the blogosphere can tell me how wrong I am. (Sorry, many days with no blogging has made me feisty!)

My opinion is that there are 4 log levels that matter for general program logging (specialized logs like audit and performance have their own rules). I don’t care what you call them so feel free to replace these with the names of your choice.

  • ERROR - an error has occurred in the program (usually an exception). All internal or unexpected failures should be logged at ERROR level. Programmers should care about anything logged as an error. User errors (like input validation) should generally NOT be logged at ERROR level. These are expected (if invalid) inputs and you should respond to the user appropriately (another post altogether), but this is not a program error. Exceptions may be made for things like repeated invalid password attempts that are likely security problems.
  • WARNING - an anomalous condition has been detected and the program will attempt to deal with it. No action needs to be taken externally but you might be interested if things go down in flames 5 minutes later. The conditions for warnings are relatively rare but an example would be reaching a warning threshold on a connection pool or a loss of connectivity that can be repaired by reconnecting to the same or different source.
  • INFO - an interesting piece of information that helps to give context to a log, often when things are starting or stopping. INFO messages should never be printed on a “per transaction” (whatever that means to you) path through the code. That is, INFO messages should be 1-time or very occasional messages.
  • DEBUG - whatever your OCD programmer mind desires.

The first three levels (ERROR, WARNING, and INFO) should always be on. If your logs grow rapidly with these levels on, something is wrong. You should be able to run in production with these levels for weeks without a problem (but you should really use a rolling log writer just in case). DEBUG should be used only during development for debugging.

On the subject of hierarchical loggers, I generally find them to be more annoying than useful. If you do use them, I really prefer to use them with the DEBUG level for turning on a targeted set of debug logging, not for changing what comes out of ERROR, WARNING, and INFO.


be the first to rate this blog

About Alex Miller

Alex Miller is a Sr. Engineer with Terracotta Inc, the makers of the open-source Java clustering product Terracotta. Prior to Terracotta, Alex worked at BEA Systems on the AquaLogic product line and was Chief Architect at MetaMatrix. His interests include Java, concurrency, distributed systems, query languages, and software design. Alex enjoys writing his blog at http://tech.puredanger.com and has spoken at a number of Java user group meetings and conferences.

More About Alex »