clonning the same setup we already had for the http logging (issue #177)