a simple logger utility with C implementation