diff --git a/crates/nu-std/std/log.nu b/crates/nu-std/std/log.nu index 7cbf55c7df..1e2d222144 100644 --- a/crates/nu-std/std/log.nu +++ b/crates/nu-std/std/log.nu @@ -32,6 +32,8 @@ export-env { } $env.NU_LOG_FORMAT = $"%ANSI_START%%DATE%|%LEVEL%|(ansi u)%MSG%%ANSI_STOP%" + + $env.NU_LOG_DATE_FORMAT = "%Y-%m-%dT%H:%M:%S%.3f" } def log-types [] { @@ -139,7 +141,7 @@ def current-log-level [] { } def now [] { - date now | format date "%Y-%m-%dT%H:%M:%S%.3f" + date now | format date $env.NU_LOG_DATE_FORMAT } def handle-log [