* Split up logLine() with helper functions