diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-12-12 23:36:25 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-12-12 23:36:25 +0000 |
commit | 20a8c39aa25d454a3fa142f125003ad242d73ea0 (patch) | |
tree | cfb6d937c300f04e455de1845d18f62e594ce713 /lib/backupstore/BackupCommands.cpp | |
parent | 4220d1bde508875d96036f04a1c62fab4742733b (diff) |
Log the account name with connections, disconnections and statistics, requested by Pete Jalajas.
Diffstat (limited to 'lib/backupstore/BackupCommands.cpp')
-rw-r--r-- | lib/backupstore/BackupCommands.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp index 9552d831..b2a42eb7 100644 --- a/lib/backupstore/BackupCommands.cpp +++ b/lib/backupstore/BackupCommands.cpp @@ -89,16 +89,16 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolLogin::DoCommand(BackupProtoc if(mClientID != rContext.GetClientID()) { BOX_WARNING("Failed login from client ID " << - BOX_FORMAT_ACCOUNT(mClientID) << - ": wrong certificate for this account"); + BOX_FORMAT_ACCOUNT(mClientID) << ": " + "wrong certificate for this account"); return PROTOCOL_ERROR(Err_BadLogin); } if(!rContext.GetClientHasAccount()) { BOX_WARNING("Failed login from client ID " << - BOX_FORMAT_ACCOUNT(mClientID) << - ": no such account on this server"); + BOX_FORMAT_ACCOUNT(mClientID) << ": " + "no such account on this server"); return PROTOCOL_ERROR(Err_BadLogin); } @@ -128,8 +128,8 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolLogin::DoCommand(BackupProtoc // Log login BOX_NOTICE("Login from Client ID " << - BOX_FORMAT_ACCOUNT(mClientID) << - " " << + BOX_FORMAT_ACCOUNT(mClientID) << " " + "(name=" << rContext.GetAccountName() << "): " << (((mFlags & Flags_ReadOnly) != Flags_ReadOnly) ?"Read/Write":"Read-only")); @@ -152,7 +152,8 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolLogin::DoCommand(BackupProtoc std::auto_ptr<BackupProtocolMessage> BackupProtocolFinished::DoCommand(BackupProtocolReplyable &rProtocol, BackupStoreContext &rContext) const { BOX_NOTICE("Session finished for Client ID " << - BOX_FORMAT_ACCOUNT(rContext.GetClientID())); + BOX_FORMAT_ACCOUNT(rContext.GetClientID()) << " " + "(name=" << rContext.GetAccountName() << ")"); // Let the context know about it rContext.ReceivedFinishCommand(); |