dev1.0 版本

This commit is contained in:
2026-06-07 11:05:26 +08:00
commit 777c8b2021
10 changed files with 505 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# <<*>> -^v- SNOWARE APPLICATION
# usage: UNIVERSAL
# author: S.A.
# time: 2026-06-07
# license: All rights received.
# CRITICAL! This function decides where the log file will be stored.
def generate_logfile_path(
proc_duty = "MineSentinel",
time_format = "%Y%m%d_%H%M"
)
# Ensure that destination exists.
result = system "mkdir -p /var/log/snoware"
if not result
raise Errno::EBADEXEC
end
return "/var/log/snoware" + "/" + proc_duty + "/" + Time.now.strftime(time_format) + ".log"
end