Skip to content

Commit

Permalink
pad logging time
Browse files Browse the repository at this point in the history
  • Loading branch information
mchome committed Nov 12, 2016
1 parent 9f64a6b commit 7847ab7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ void logging(char msg[10], unsigned char *packet, int length) {
struct tm *p;
time(&timep);
p = localtime(&timep);
fprintf(ptr_file, "[%d/%d/%d %s %d:%d:%d] ", (1900+p->tm_year), (1+p->tm_mon), p->tm_mday, wday[p->tm_wday], p->tm_hour, p->tm_min, p->tm_sec);
fprintf(ptr_file, "[%04d/%02d/%02d %s %02d:%02d:%02d] ",
(1900 + p -> tm_year), (1 + p -> tm_mon), p -> tm_mday, wday[p -> tm_wday], p -> tm_hour, p -> tm_min, p -> tm_sec);

fprintf(ptr_file, "%s", msg);
for (int i = 0; i < length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "configparse.h"
#include "auth.h"

#define VERSION "1.0.0"
#define VERSION "1.0.1"

void print_help(int exval);

Expand Down

0 comments on commit 7847ab7

Please sign in to comment.