/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 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: ToolLogWriter.java,v 1.2 2009/11/13 21:52:43 ak138937 Exp $
*
*/
/**
* Writes log entries.
*/
public class ToolLogWriter {
private static boolean enabled = false;
private ToolLogWriter() {
}
/**
* Initializes the logger with environment parameters.
*/
//log only above the log level specified
logger.setUseParentHandlers(false);
"off");
}
/**
* Writes to log.
*
* @param bundleName Name of the resource bundle.
* @param level Logging level of the message.
* @param msgId ID for message.
* @param msgdata array of log message "data".
* @throws DTException if log cannot be written.
*/
public static void log(
) throws DTException {
if (enabled) {
try {
}
}
} catch (Exception e) {
throw new DTException(e.getMessage());
}
}
}
/**
* Writes to log.
*
* @param bundle Resource bundle to be used.
* @param level Logging level of the message.
* @param msgId ID for message.
* @param msgdata array of log message "data".
* @throws DTException if log cannot be written.
*/
public static void log(
) throws DTException {
if (enabled) {
try {
}
}
} catch (Exception e) {
throw new DTException(e.getMessage());
}
}
}
/**
* Writes to log.
*
* @param msg Message string.
* @throws DTException if log cannot be written.
*/
public static void log(
) throws DTException {
if (enabled) {
try {
}
} catch (Exception e) {
throw new DTException(e.getMessage());
}
}
}
/**
* Returns formatted message with bundle name.
*
* @param msg Message to be formatted.
* @param args Arguments to be used for formatting.
* @param bundleName Name of the resource bundle.
* @return formatted message.
*/
) {
} else {
}
return result;
}
/**
* Returns formatted message from bundle.
*
* @param msg Message to be formatted.
* @param args Arguments to be used for formatting.
* @param bundle Resource bundle to use.
* @return formatted message.
*/
) {
} else {
}
return result;
}
/**
* Returns name of the log file.
*
* @return name of the log file.
*/
}
/**
* Returns level of log.
*
* @return level of the log.
*/
}
}