diff --git a/src/sdl2/log.rs b/src/sdl2/log.rs index e9fd9e4e45..6bb07cf0fb 100644 --- a/src/sdl2/log.rs +++ b/src/sdl2/log.rs @@ -122,6 +122,42 @@ pub fn log(message: &str) { } } +/// Log function which takes as priority CRITICAL and category APPLICATION +#[doc(alias = "SDL_LogCritial")] +pub fn log_critical(message: &str) { + log_with_category(message, Category::Application, Priority::Critical); +} + +/// Log function which takes as priority DEBUG and category APPLICATION +#[doc(alias = "SDL_LogDebug")] +pub fn log_debug(message: &str) { + log_with_category(message, Category::Application, Priority::Debug); +} + +/// Log function which takes as priority ERROR and category APPLICATION +#[doc(alias = "SDL_LogError")] +pub fn log_error(message: &str) { + log_with_category(message, Category::Application, Priority::Error); +} + +/// Log function which takes as priority INFO and category APPLICATION +#[doc(alias = "SDL_LogInfo")] +pub fn log_info(message: &str) { + log_with_category(message, Category::Application, Priority::Info); +} + +/// Log function which takes as priority VERBOSE and category APPLICATION +#[doc(alias = "SDL_LogVerbose")] +pub fn log_verbose(message: &str) { + log_with_category(message, Category::Application, Priority::Verbose); +} + +/// Log function which takes as priority WARN and category APPLICATION +#[doc(alias = "SDL_LogWarn")] +pub fn log_warn(message: &str) { + log_with_category(message, Category::Application, Priority::Warn); +} + /// Log function where Category and Priority can be specified pub fn log_with_category(message: &str, category: Category, priority: Priority) { let message = message.replace('%', "%%");