basic logging functionality and tests