commit:     6bc4264df660ff6f639cdd9625f5f0da20418e25
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 21 18:44:32 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 21 18:44:32 2020 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6bc4264d

defaults/initrd.scripts: log_msg(): Log milliseconds

This will allow us to see more in detail where initramfs spent time.

Bug: https://bugs.gentoo.org/738378
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/initrd.scripts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index f34e5a3..fd87623 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1084,10 +1084,10 @@ log_msg() {
        # codes and substitution can't be greedy.
        # Because Busybox's sed cannot deal with control characters, we
        # have to get rid of all non-printable characters like "^[" first...
-       LANG=C echo "${log_prefix}${msg}" | sed \
+       LANG=C echo "] ${log_prefix}${msg}" | sed \
                -e "s,[^[:print:]],,g" \
                -e 's,\(\\033\)\?\[[0-9;]\+m,,g' \
-               | ts '[%Y-%m-%d %H:%M:%S]' >> "${GK_INIT_LOG}"
+               | ts '[ %Y-%m-%d %H:%M:%.S' >> "${GK_INIT_LOG}"
 }
 
 # msg functions arguments

Reply via email to