src/SerifHTTPServer/IncomingHTTPConnection.cpp
/** Choose a vlaue for _logfile_prefix for an incoming http
 * connection.  If the necessary parent directories don't already
 * exist, then create them. */
Choose a vlaue for _logfile_prefix for an incoming http
connection.  If the necessary parent directories don't already
exist, then create them.
Choose a vlaue for _logfile_prefix for an incoming http connection . If the necessary parent directories don ' t already exist then create them .
void IncomingHTTPConnection::pick_logfile_prefix(const HTTPMessage &message) {
	OutputUtil::makeDir(_logdir);
	std::string parent_dir = join_paths(_logdir, getIOConnection().getEndpointAddress());
	OutputUtil::makeDir(parent_dir.c_str());
	time_t tim=time(NULL);
	tm *now=localtime(&tim);
	char filename_prefix[128];
	_snprintf(filename_prefix, 127, "%d-%02d-%02d.%02d%02d%02d.%06lu", 
			 now->tm_year+1900, now->tm_mon+1, now->tm_mday, 
			 now->tm_hour, now->tm_min, now->tm_sec, 
			 static_cast<unsigned long>(getConnectionId()));
	_logfile_prefix = join_paths(parent_dir, filename_prefix);
}
void IncomingHTTPConnection :: pick_logfile_prefix ( const HTTPMessage & message ) { OutputUtil :: makeDir ( _logdir ) ; std :: string parent_dir = join_paths ( _logdir , getIOConnection ( ) . getEndpointAddress ( ) ) ; OutputUtil :: makeDir ( parent_dir . c_str ( ) ) ; time_t tim = time ( NULL ) ; tm * now = localtime ( & tim ) ; char filename_prefix [ 128 ] ; _snprintf ( filename_prefix , 127 , " " , now -> tm_year + 1900 , now -> tm_mon + 1 , now -> tm_mday , now -> tm_hour , now -> tm_min , now -> tm_sec , static_cast < unsigned long > ( getConnectionId ( ) ) ) ; _logfile_prefix = join_paths ( parent_dir , filename_prefix ) ; }
Choose a vlaue for _logfile_prefix for an incoming http
 connection.
Choose a vlaue for _logfile_prefix for an incoming http connection .
// Set up parent directories.  We use a separate subdirectory for
 // each endpoint address (IP address).
 // Pick a unique prefix for this connection, using both the
 // connection id (which is unique within this process) and the
 // current time (in case the server is restarted).
 // Set the prefix.
