Smart formatter for self-documenting log