From aa2b773ef27af72d431f9309a5dcaf1edf4da6d2 Mon Sep 17 00:00:00 2001 From: JP_1 Date: Mon, 25 Dec 2023 08:30:41 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAslurmrestd=E8=BF=9B=E7=A8=8B=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=8D=95=E7=8B=AC=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: JP_1 --- add_slurmrestd_log_git.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 add_slurmrestd_log_git.patch diff --git a/add_slurmrestd_log_git.patch b/add_slurmrestd_log_git.patch new file mode 100644 index 0000000..73337d9 --- /dev/null +++ b/add_slurmrestd_log_git.patch @@ -0,0 +1,20 @@ +diff --git "a/D:\\02Code\\slurm\\slurm-21.08.8-2-origin\\src\\slurmrestd\\slurmrestd.c" "b/D:\\02Code\\slurm\\slurm-21.08.8-2-modify\\src\\slurmrestd\\slurmrestd.c" +index 535f590..d2a2a92 100644 +--- "a/D:\\02Code\\slurm\\slurm-21.08.8-2-origin\\src\\slurmrestd\\slurmrestd.c" ++++ "b/D:\\02Code\\slurm\\slurm-21.08.8-2-modify\\src\\slurmrestd\\slurmrestd.c" +@@ -220,8 +220,14 @@ static void _setup_logging(int argc, char **argv) + logopt.stderr_level += debug_level; + } + +- if (log_init(xbasename(argv[0]), logopt, fac, NULL)) ++ /*modified to create slurmrestd.log*/ ++ logopt.logfile_level += debug_level; ++ char* logfile = xstrdup("/var/log/slurm/slurmrestd.log"); ++ if (log_init(xbasename(argv[0]), logopt, fac, logfile)) + fatal("Unable to setup logging: %m"); ++ ++ xfree(logfile); ++ /*end modified*/ + } + + /* -- Gitee