Simplify platform specific logging code