Class AccessLog
java.lang.Object
net.vincent.communidirect.server.AccessLog
Records inbound connection events to a flat-text access log file.
Each call to logAccess(Socket) appends a single line containing
a timestamp and the remote IP address.
Note: The underlying FileWriter is opened without the
append flag, so each invocation overwrites the previous content. This is
intentional for the current lightweight logging design.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AccessLog
Constructs anAccessLog. Callinit(String)before logging any events.- Parameters:
serverLauncher- the owning server launcher instance
-
-
Method Details
-
init
Configures the log file destination. Must be called once before any calls tologAccess(Socket).- Parameters:
logFile- absolute path to the log file to write
-
logAccess
Appends a timestamped access entry for the given socket's remote address.- Parameters:
clientSocket- the accepted client socket whose IP is recorded
-