Merge pull request #23821 from dtardon/ascii-logging

Allow ASCII fallback for Unicode characters in logs
This commit is contained in:
Yu Watanabe
2022-06-29 03:36:35 +09:00
committed by GitHub
40 changed files with 193 additions and 106 deletions
+1 -1
View File
@@ -1959,7 +1959,7 @@ static int method_enqueue_marked_jobs(sd_bus_message *message, void *userdata, s
if (r == 0)
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
log_info("Queuing reload/restart jobs for marked units…");
log_info("Queuing reload/restart jobs for marked units%s", special_glyph(SPECIAL_GLYPH_ELLIPSIS));
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
r = sd_bus_message_new_method_return(message, &reply);
+2 -1
View File
@@ -484,7 +484,8 @@ static int bus_service_set_transient_property(
return log_oom();
if (!UNIT_WRITE_FLAGS_NOOP(flags))
log_unit_notice(u, "Transient unit's PIDFile= property references path below legacy directory /var/run, updating %s → %s; please update client accordingly.", n, z);
log_unit_notice(u, "Transient unit's PIDFile= property references path below legacy directory /var/run, updating %s %s %s; please update client accordingly.",
n, special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), z);
free_and_replace(n, z);
}
+4 -2
View File
@@ -309,9 +309,11 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
r = fd_get_path(fd, &fn);
if (r < 0)
log_debug_errno(r, "Received serialized fd %i → %m", fd);
log_debug_errno(r, "Received serialized fd %i %s %m",
fd, special_glyph(SPECIAL_GLYPH_ARROW_RIGHT));
else
log_debug("Received serialized fd %i → %s", fd, strna(fn));
log_debug("Received serialized fd %i %s %s",
fd, special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), strna(fn));
}
}
}
+2 -2
View File
@@ -1616,7 +1616,7 @@ static void manager_coldplug(Manager *m) {
assert(m);
log_debug("Invoking unit coldplug() handlers…");
log_debug("Invoking unit coldplug() handlers%s", special_glyph(SPECIAL_GLYPH_ELLIPSIS));
/* Let's place the units back into their deserialized state */
HASHMAP_FOREACH_KEY(u, k, m->units) {
@@ -1637,7 +1637,7 @@ static void manager_catchup(Manager *m) {
assert(m);
log_debug("Invoking unit catchup() handlers…");
log_debug("Invoking unit catchup() handlers%s", special_glyph(SPECIAL_GLYPH_ELLIPSIS));
/* Let's catch up on any state changes that happened while we were reloading/reexecing */
HASHMAP_FOREACH_KEY(u, k, m->units) {
+5 -2
View File
@@ -19,6 +19,7 @@
#include "extension-release.h"
#include "fd-util.h"
#include "format-util.h"
#include "glyph-util.h"
#include "label.h"
#include "list.h"
#include "loop-util.h"
@@ -1279,7 +1280,8 @@ static int follow_symlink(
"Symlink loop on '%s'.",
mount_entry_path(m));
log_debug("Followed mount entry path symlink %s → %s.", mount_entry_path(m), target);
log_debug("Followed mount entry path symlink %s %s %s.",
mount_entry_path(m), special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), target);
mount_entry_consume_prefix(m, TAKE_PTR(target));
@@ -1418,7 +1420,8 @@ static int apply_one_mount(
if (r < 0)
return log_debug_errno(r, "Failed to follow symlinks on %s: %m", mount_entry_source(m));
log_debug("Followed source symlinks %s → %s.", mount_entry_source(m), chased);
log_debug("Followed source symlinks %s %s %s.",
mount_entry_source(m), special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), chased);
free_and_replace(m->source_malloc, chased);
+2 -1
View File
@@ -1282,7 +1282,8 @@ static int socket_symlink(Socket *s) {
}
if (r < 0)
log_unit_warning_errno(UNIT(s), r, "Failed to create symlink %s → %s, ignoring: %m", p, *i);
log_unit_warning_errno(UNIT(s), r, "Failed to create symlink %s %s %s, ignoring: %m",
p, special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), *i);
}
return 0;