Skip to content

Commit

Permalink
[8001] Write client and proxy user info to ips data file in correct o…
Browse files Browse the repository at this point in the history
…rder.
  • Loading branch information
korydraughn committed Dec 6, 2024
1 parent 9a7a55e commit 595f17e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions server/core/src/procLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include <boost/lexical_cast.hpp>

#include <cstdio>
#include <ctime>
#include <charconv>
#include <fstream>

Expand Down Expand Up @@ -89,10 +91,16 @@ logAgentProc( rsComm_t *rsComm ) {
return UNIX_FILE_OPEN_ERR - errno;
}

fprintf( fptr, "%s %s %s %s %s %s %u\n",
rsComm->proxyUser.userName, clientZone,
rsComm->clientUser.userName, proxyZone,
progName, remoteAddr, ( unsigned int ) time( 0 ) );
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
std::fprintf(fptr,
"%s %s %s %s %s %s %u\n",
rsComm->clientUser.userName,
clientZone,
rsComm->proxyUser.userName,
proxyZone,
progName,
remoteAddr,
static_cast<unsigned int>(std::time(nullptr)));

rsComm->procLogFlag = PROC_LOG_DONE;
fclose( fptr );
Expand Down

0 comments on commit 595f17e

Please sign in to comment.