/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: LogWriter.java,v 1.3 2008/06/25 05:42:09 qcheng Exp $
*
* Portions Copyrighted 2015-2016 ForgeRock AS.
*/
/**
* Writes audit log entries.
*/
public class LogWriter {
/**
* Access Log Type.
*/
/**
* Error Log Type.
*/
private static final List<String> IGNORED_LOG_FIELDS = Arrays.asList("error message", "realm", "user id");
private static final Map<String, String> NORMALIZED_FIELD_NAMES = new ImmutableMap.Builder<String, String>()
.build();
private LogWriter() {
}
/**
* Writes to log.
*
* @param mgr Command Manager Object.
* @param type Type of log message.
* @param level Logging level of the message.
* @param msgid ID for message.
* @param msgdata array of log message "data".
* @param ssoToken Single Sign On Token of the user who committed the
* operation.
* @throws CLIException if log cannot be written.
*/
public static void log(
int type,
) throws CLIException {
switch (type) {
case LOG_ERROR:
break;
default:
}
try {
}
}
}
} catch (Exception e) {
}
}
}
if (logMessageID == null) {
return;
}
} else {
return;
}
}
private static void sendEvent(String topic, JsonValue eventJson, String sessionId, String baseUrl) throws HttpApplicationException, URISyntaxException {
} else {
}
}
private static AMAccessAuditEventBuilder accessEventBuilder(int type, String msgid, String[] msgdata,
}
}
}
}
if (errorMessageIndex > -1) {
} else {
}
} else {
}
}
return accessEventBuilder;
}
private static AMAuthenticationAuditEventBuilder authenticationEventBuilder(int type, String msgid, List<String> fields,
}
}
try {
} catch (IOException e) {
responseText = "--unknown--";
}
}
return null;
}
};
}