mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
basic/log: add debug-level log_oom() variant
This is useful for contexts where only debug-level messages are allowed.
This commit is contained in:
parent
6597686865
commit
b3a7915805
@ -885,9 +885,8 @@ void log_assert_failed_return_realm(
|
||||
"Assertion '%s' failed at %s:%u, function %s(). Ignoring.");
|
||||
}
|
||||
|
||||
int log_oom_internal(LogRealm realm, const char *file, int line, const char *func) {
|
||||
return log_internal_realm(LOG_REALM_PLUS_LEVEL(realm, LOG_ERR),
|
||||
ENOMEM, file, line, func, "Out of memory.");
|
||||
int log_oom_internal(int level, const char *file, int line, const char *func) {
|
||||
return log_internal_realm(level, ENOMEM, file, line, func, "Out of memory.");
|
||||
}
|
||||
|
||||
int log_format_iovec(
|
||||
|
@ -168,7 +168,7 @@ int log_struct_internal(
|
||||
const char *format, ...) _printf_(6,0) _sentinel_;
|
||||
|
||||
int log_oom_internal(
|
||||
LogRealm realm,
|
||||
int level,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func);
|
||||
@ -286,7 +286,8 @@ int log_emergency_level(void);
|
||||
log_dump_internal(LOG_REALM_PLUS_LEVEL(LOG_REALM, level), \
|
||||
0, PROJECT_FILE, __LINE__, __func__, buffer)
|
||||
|
||||
#define log_oom() log_oom_internal(LOG_REALM, PROJECT_FILE, __LINE__, __func__)
|
||||
#define log_oom() log_oom_internal(LOG_REALM_PLUS_LEVEL(LOG_REALM, LOG_ERR), PROJECT_FILE, __LINE__, __func__)
|
||||
#define log_oom_debug() log_oom_internal(LOG_REALM_PLUS_LEVEL(LOG_REALM, LOG_DEBUG), PROJECT_FILE, __LINE__, __func__)
|
||||
|
||||
bool log_on_console(void) _pure_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user