Basic functions for log parsing