Define custom formatting for timestamps and exceptions