This commit is contained in:
biosvos
2026-08-07 17:38:18 +09:00
commit 873193a243
9613 changed files with 2755992 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define DEFAULT_LOGFILE_PATH "."
int main()
{
char *makeLogString();
FILE *shLogFile=NULL;
shLogFile = fopen(makeLogString(), "a");
fprintf(shLogFile, "-------- shit ----------\n");
fclose(shLogFile);
return 0;
}
char *makeLogString()
{
struct tm *t;
time_t timer;
static char log_path_file[128];
timer = time(NULL);
t = localtime(&timer);
snprintf(log_path_file, 128, "%ssh_statusd_%04d%02d%02d.log", DEFAULT_LOGFILE_PATH,
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday);
return log_path_file;
}