More flexible logging system