mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
27.19.2009 7637ccfe91a1cbbdd665404ef3ba0c2ad6314e98
opends/src/server/org/opends/server/loggers/TextAccessLogPublisher.java
@@ -854,6 +854,20 @@
   * {@inheritDoc}
   */
  @Override
  public void logConnectIntermediateMessage(
      ClientConnection clientConnection, String category,
      Map<String, String> content)
  {
    logIntermediateMessage(clientConnection, "CONNECT", category,
        content);
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void logDeleteIntermediateMessage(DeleteOperation deleteOperation,
      String category, Map<String, String> content)
  {
@@ -997,6 +1011,20 @@
   * {@inheritDoc}
   */
  @Override
  public void logDisconnectIntermediateMessage(
      ClientConnection clientConnection, String category,
      Map<String, String> content)
  {
    logIntermediateMessage(clientConnection, "DISCONNECT", category,
        content);
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void logExtendedIntermediateMessage(
      ExtendedOperation extendedOperation, String category,
      Map<String, String> content)
@@ -1461,11 +1489,11 @@
  private void appendHeader(Operation operation, String opType,
      String category, StringBuilder buffer)
  {
    buffer.append("[");
    buffer.append('[');
    buffer.append(TimeThread.getLocalTime());
    buffer.append("] ");
    buffer.append(opType);
    buffer.append(" ");
    buffer.append(' ');
    buffer.append(category);
    buffer.append(" conn=");
    buffer.append(operation.getConnectionID());
@@ -1526,4 +1554,40 @@
    writer.writeRecord(buffer.toString());
  }
  //Writes an intermediate message to the log.
  private void logIntermediateMessage(
      ClientConnection clientConnection, String type, String category,
      Map<String, String> content)
  {
    long connectionID = clientConnection.getConnectionID();
    if (connectionID < 0 && suppressInternalOperations)
    {
      return;
    }
    StringBuilder buffer = new StringBuilder(100);
    buffer.append('[');
    buffer.append(TimeThread.getLocalTime());
    buffer.append("] ");
    buffer.append(type);
    buffer.append(' ');
    buffer.append(category);
    buffer.append(" conn=");
    buffer.append(connectionID);
    for (Map.Entry<String, String> entry : content.entrySet())
    {
      buffer.append(' ');
      buffer.append(entry.getKey());
      buffer.append('=');
      buffer.append(entry.getValue());
    }
    writer.writeRecord(buffer.toString());
  }
}