err
Log an error message. This log level is intended to be used when something has gone wrong. This might be recoverable or might be followed by the program exiting.
Function parameters
Parameters
- format:[]const u8
- args:anytype
Type definitions in this namespace
Types
Determine if a specific log message level and scope combination are enabled for logging.
Functions
- logEnabled
- Determine if a specific log message level and scope combination are enabled for logging.
- defaultLogEnabled
- Determine if a specific log message level using the default log scope is enabled for logging.
- defaultLog
- The default implementation for the log function.
- scoped
- Returns a scoped logging namespace that logs all messages using the scope
The default log level is based on build mode.
Values
- default_level
- The default log level is based on build mode.
- default_log_scope
- = .default
- err
- Log an error message using the default scope.
- warn
- Log a warning message using the default scope.
- info
- Log an info message using the default scope.
- debug
- Log a debug message using the default scope.
Source
Implementation
pub fn err(
comptime format: []const u8,
args: anytype,
) void {
@branchHint(.cold);
log(.err, scope, format, args);
}