mirror of
https://github.com/tenrok/Rfid-Credential-Provider.git
synced 2026-06-14 18:52:23 +03:00
Adding files from my site
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "common.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "Logger.h"
|
||||
|
||||
void Log(const char *toWrite){
|
||||
FILE * pFile;
|
||||
|
||||
time_t now;
|
||||
struct tm *ts;
|
||||
char buf[80];
|
||||
|
||||
now = time(NULL);
|
||||
|
||||
ts = localtime(&now);
|
||||
strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S", ts);
|
||||
|
||||
pFile = fopen ("C:\\RfidCredentialProvider.log.txt","a");
|
||||
fprintf(pFile, "%s\t%s\n", buf, toWrite);
|
||||
fclose(pFile);
|
||||
}
|
||||
Reference in New Issue
Block a user