diff options
Diffstat (limited to 'db/client.cpp')
-rw-r--r-- | db/client.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/client.cpp b/db/client.cpp index c62e5490d0e..8ac5006348f 100644 --- a/db/client.cpp +++ b/db/client.cpp @@ -141,4 +141,18 @@ namespace mongo { _client->_context = _oldContext; // note: _oldContext may be null } + string Client::toString() const { + stringstream ss; + if ( _curOp ) + ss << _curOp->infoNoauth().jsonString(); + return ss.str(); + } + + string sayClientState(){ + Client* c = currentClient.get(); + if ( ! c ) + return "no client"; + return c->toString(); + } + } |