Skip to content
Snippets Groups Projects
Commit 0a83fa90 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

skip the pid from the logging

parent daeb1431
No related branches found
No related tags found
No related merge requests found
...@@ -43,8 +43,7 @@ sub logmsg { ...@@ -43,8 +43,7 @@ sub logmsg {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time); localtime(time);
open(FTPLOG, ">>log/ftpd.log"); open(FTPLOG, ">>log/ftpd.log");
printf FTPLOG ("%02d:%02d:%02d (%d) ", printf FTPLOG ("%02d:%02d:%02d ", $hour, $min, $sec);
$hour, $min, $sec, $$);
print FTPLOG @_; print FTPLOG @_;
close(FTPLOG); close(FTPLOG);
} }
......
...@@ -191,10 +191,10 @@ static void logmsg(const char *msg, ...) ...@@ -191,10 +191,10 @@ static void logmsg(const char *msg, ...)
logfp = fopen(DEFAULT_LOGFILE, "a"); logfp = fopen(DEFAULT_LOGFILE, "a");
fprintf(logfp?logfp:stderr, /* write to stderr if the logfile doesn't open */ fprintf(logfp?logfp:stderr, /* write to stderr if the logfile doesn't open */
"%02d:%02d:%02d (%d) %s\n", "%02d:%02d:%02d %s\n",
curr_time->tm_hour, curr_time->tm_hour,
curr_time->tm_min, curr_time->tm_min,
curr_time->tm_sec, (int)getpid(), buffer); curr_time->tm_sec, buffer);
if(logfp) if(logfp)
fclose(logfp); fclose(logfp);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment