DebugImpl.java revision c1b45299506613a522e8eeaffe0efd1b9cd5e355
4501N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4501N/A * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved 4501N/A * The contents of this file are subject to the terms 4501N/A * of the Common Development and Distribution License 4501N/A * (the License). You may not use this file except in 4501N/A * compliance with the License. 4501N/A * You can obtain a copy of the License at 4501N/A * See the License for the specific language governing 4501N/A * permission and limitations under the License. 4501N/A * When distributing Covered Code, include this CDDL 4501N/A * Header Notice in each file and include the License file 4501N/A * If applicable, add the following below the CDDL Header, 4501N/A * with the fields enclosed by brackets [] replaced by 4501N/A * your own identifying information: 4501N/A * "Portions Copyrighted [year] [name of copyright owner]" 4830N/A * Portions Copyrighted 2014-2015 ForgeRock AS. 4798N/A * Debug implementation class. 4798N/A * Creates an instance of <code>DebugImpl</code>. 4501N/A * @param debugName Name of the debug. 4501N/A * @param debugFileProvider A debug file provider 4517N/A //NB : we don't initialize debugFile now, we will do it when we will write on it 4798N/A * @param level Debug level. 4501N/A // ignore invalid level values 4501N/A * @param strDebugLevel Debug level. 4501N/A // ignore invalid level values 4501N/A * @param debugLevel Debug level. 4501N/A * Reset this instance - ths will trigger this instance to reinitialize 4501N/A * @param mf merge flag : true: merge debugs into a single file.` 4798N/A // Note : we don't need to close the writer we will keep it 4798N/A // in the Writer cache in case merge mode changes again. 4641N/A * Returns <code>true</code> if debug is enabled. 4641N/A * @return <code>true</code> if debug is enabled. 4501N/A * Returns <code>true</code> if debug warning is enabled. 4501N/A * @return <code>true</code> if debug warning is enabled. 4501N/A * Returns <code>true</code> if debug error is enabled. 4501N/A * @return <code>true</code> if debug error is enabled. 4501N/A * @param message Debug message. 4501N/A * @param th Throwable object along with the message. 4501N/A * Writes debug warning message. 4501N/A * @param message Debug message. 4501N/A * @param th Throwable object along with the warning message. 4811N/A * Writes debug error message. 4811N/A * @param message Debug message. 4811N/A * @param th Throwable object along with the error message. 4659N/A * Write message on Debug file. If it failed, it try to print it on the Sdtout Debug file. 4641N/A * If both failed, it prints in System.out 4659N/A * @param prefix Message prefix 4501N/A * @param msg Message to be recorded. 4802N/A * @param th the optional <code>java.lang.Throwable</code> which if 4659N/A * present will be used to record the stack trace. 4659N/A //we create the debug file only if we need to write on it 4802N/A * In order to have less logs for this kind of issue. It's waiting an interval of time before 4659N/A * printing this error again. 4501N/A * Return the Debug file name that should be used for this debug name 4802N/A * @return the debug file name to use 4641N/A // Find the bucket this debug belongs to 4641N/A // Default to debugName if no mapping is found 4659N/A * initialize the properties 4659N/A * It will reset the current properties for every Debug instance