aboutsummaryrefslogtreecommitdiff
path: root/units/log.zsh
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2025-05-19 18:01:39 +0500
committerMaria Lisina <sekoohaka.sarisan@gmail.com>2025-05-19 18:01:39 +0500
commit03a7c5b049ff7ba50330c77452575133f84e386e (patch)
treef79ff366d099de59631e9936ee58f01a482f08e6 /units/log.zsh
parent0ff0b7f0e6b99aedc52c031e476ec85cb6702c97 (diff)
bot: Begin porting to Z Shell
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
Diffstat (limited to 'units/log.zsh')
-rw-r--r--units/log.zsh10
1 files changed, 10 insertions, 0 deletions
diff --git a/units/log.zsh b/units/log.zsh
new file mode 100644
index 0000000..2e5b972
--- /dev/null
+++ b/units/log.zsh
@@ -0,0 +1,10 @@
+# Copyright (C) 2024-2025 Maria Lisina
+# Copyright (C) 2024-2025 Danil Lisin
+# SPDX-License-Identifier: Apache-2.0
+
+if [[ -n "${no_logs}" ]]
+then
+ return 0
+fi
+
+printf "[%s] %s\n" "$(date +"%Y-%m-%d %X")" "${log_text}"