More generic logging example code