error static method
Logs an error message.
category: The category of the log.message: The message to log.environment: Optional environment context.
Returns: A LogError indicating success or failure.
Implementation
static LogError error(String category, String message,
{String? environment}) =>
log(category, message,
environment: environment ?? '', level: LogLevel.error);