generic logging class