summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-27 20:20:23 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-27 22:05:24 +0100
commit79008bddf679a5e0900369950eb346c9fa687107 (patch)
tree620eed51b44a64aa065c4184a4661c8c95c146e3 /src/shared
parente09ca588d25a0c383880d6c2f5b129296af781ab (diff)
log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/env-util.c2
-rw-r--r--src/shared/log.c14
-rw-r--r--src/shared/log.h22
3 files changed, 19 insertions, 19 deletions
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index d90b878d19..fbdc73dd2c 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -425,7 +425,7 @@ char **strv_env_clean_log(char **e, const char *unit_id, const char *message) {
if (!env_assignment_is_valid(*p)) {
if (message)
- log_error_unit(unit_id, "Ignoring invalid environment '%s': %s", *p, message);
+ log_unit_error(unit_id, "Ignoring invalid environment '%s': %s", *p, message);
free(*p);
continue;
}
diff --git a/src/shared/log.c b/src/shared/log.c
index d87f43f5a4..dcbcd9d9c9 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -627,7 +627,7 @@ int log_dump_internal(
return log_dispatch(level, error, file, line, func, NULL, NULL, buffer);
}
-int log_metav(
+int log_internalv(
int level,
int error,
const char*file,
@@ -652,7 +652,7 @@ int log_metav(
return log_dispatch(level, error, file, line, func, NULL, NULL, buffer);
}
-int log_meta(
+int log_internal(
int level,
int error,
const char*file,
@@ -664,13 +664,13 @@ int log_meta(
va_list ap;
va_start(ap, format);
- r = log_metav(level, error, file, line, func, format, ap);
+ r = log_internalv(level, error, file, line, func, format, ap);
va_end(ap);
return r;
}
-int log_metav_object(
+int log_object_internalv(
int level,
int error,
const char*file,
@@ -697,7 +697,7 @@ int log_metav_object(
return log_dispatch(level, error, file, line, func, object_field, object, buffer);
}
-int log_meta_object(
+int log_object_internal(
int level,
int error,
const char*file,
@@ -711,7 +711,7 @@ int log_meta_object(
va_list ap;
va_start(ap, format);
- r = log_metav_object(level, error, file, line, func, object_field, object, format, ap);
+ r = log_object_internalv(level, error, file, line, func, object_field, object, format, ap);
va_end(ap);
return r;
@@ -756,7 +756,7 @@ void log_assert_failed_return(const char *text, const char *file, int line, cons
}
int log_oom_internal(const char *file, int line, const char *func) {
- log_meta(LOG_ERR, ENOMEM, file, line, func, "Out of memory.");
+ log_internal(LOG_ERR, ENOMEM, file, line, func, "Out of memory.");
return -ENOMEM;
}
diff --git a/src/shared/log.h b/src/shared/log.h
index 9dd68df500..278010432d 100644
--- a/src/shared/log.h
+++ b/src/shared/log.h
@@ -75,40 +75,40 @@ void log_close_console(void);
void log_parse_environment(void);
-int log_meta(
+int log_internal(
int level,
int error,
- const char*file,
+ const char *file,
int line,
const char *func,
const char *format, ...) _printf_(6,7);
-int log_metav(
+int log_internalv(
int level,
int error,
- const char*file,
+ const char *file,
int line,
const char *func,
const char *format,
va_list ap) _printf_(6,0);
-int log_meta_object(
+int log_object_internal(
int level,
int error,
- const char*file,
+ const char *file,
int line,
const char *func,
- const char *object_name,
+ const char *object_field,
const char *object,
const char *format, ...) _printf_(8,9);
-int log_metav_object(
+int log_object_internalv(
int level,
int error,
const char*file,
int line,
const char *func,
- const char *object_name,
+ const char *object_field,
const char *object,
const char *format,
va_list ap) _printf_(8,0);
@@ -130,7 +130,7 @@ int log_oom_internal(
int log_dump_internal(
int level,
int error,
- const char*file,
+ const char *file,
int line,
const char *func,
char *buffer);
@@ -158,7 +158,7 @@ void log_assert_failed_return(
#define log_full_errno(level, error, ...) \
do { \
if (log_get_max_level() >= (level)) \
- log_meta((level), error, __FILE__, __LINE__, __func__, __VA_ARGS__); \
+ log_internal((level), error, __FILE__, __LINE__, __func__, __VA_ARGS__); \
} while (false)
#define log_full(level, ...) log_full_errno(level, 0, __VA_ARGS__)