Index: lutinutil/src/java/org/codelutin/util/Log.java diff -u lutinutil/src/java/org/codelutin/util/Log.java:1.3 lutinutil/src/java/org/codelutin/util/Log.java:1.4 --- lutinutil/src/java/org/codelutin/util/Log.java:1.3 Fri Aug 13 10:27:20 2004 +++ lutinutil/src/java/org/codelutin/util/Log.java Mon Aug 16 15:01:33 2004 @@ -23,9 +23,9 @@ * Created: 12 août 2004 * * @author Benjamin Poussin - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ * - * Mise a jour: $Date: 2004/08/13 10:27:20 $ + * Mise a jour: $Date: 2004/08/16 15:01:33 $ * par : $Author: bpoussin $ */ @@ -224,17 +224,54 @@ fire(category, message, max, current); } + static public void log(String category, Level level, String message, Throwable e){ + if(e == null){ + Logger.getLogger(category).log(level, message); + }else{ + Logger.getLogger(category).log(level, message, e); + } + } + static public void logDevFinest(String category, String message){ + logDevFinest(category, message, null); + } + static public void logDevFinest(String category, String message, Throwable e){ + log(category, Level.FINEST, message, e); + } + + static public void logDevFiner(String category, String message){ + logDevFiner(category, message, null); + } + static public void logDevFiner(String category, String message, Throwable e){ + log(category, Level.FINER, message, e); + } + + static public void logDevFine(String category, String message){ + logDevFine(category, message, null); + } + static public void logDevFine(String category, String message, Throwable e){ + log(category, Level.FINE, message, e); + } static public void logDevInfo(String category, String message){ - logDevInfo(category, message); + logDevInfo(category, message, null); } static public void logDevInfo(String category, String message, Throwable e){ - if(e == null){ - Logger.getLogger(category).log(Level.INFO, message); - }else{ - Logger.getLogger(category).log(Level.INFO, message, e); - } + log(category, Level.INFO, message, e); + } + + static public void logDevWarn(String category, String message){ + logDevInfo(category, message, null); + } + static public void logDevWarn(String category, String message, Throwable e){ + log(category, Level.WARNING, message, e); + } + + static public void logDevSevere(String category, String message){ + logDevSevere(category, message, null); + } + static public void logDevSevere(String category, String message, Throwable e){ + log(category, Level.SEVERE, message, e); } } // Log Index: lutinutil/src/java/org/codelutin/util/LoggingException.java diff -u lutinutil/src/java/org/codelutin/util/LoggingException.java:1.1 lutinutil/src/java/org/codelutin/util/LoggingException.java:1.2 --- lutinutil/src/java/org/codelutin/util/LoggingException.java:1.1 Mon Aug 2 17:51:45 2004 +++ lutinutil/src/java/org/codelutin/util/LoggingException.java Mon Aug 16 15:01:33 2004 @@ -10,7 +10,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -23,16 +23,16 @@ * * @author POUSSIN Benjamin * Copyright Code Lutin - * @version $Revision: 1.1 $ - * - * Mise a jour: $Date: 2004/08/02 17:51:45 $ + * @version $Revision: 1.2 $ + * + * Mise a jour: $Date: 2004/08/16 15:01:33 $ * par : $Author: bpoussin $ */ -package org.codelutin.logging; +package org.codelutin.util; public class LoggingException extends RuntimeException { // LogException - + public LoggingException(String msg) { super(msg); } @@ -40,5 +40,5 @@ public LoggingException(String msg, Throwable e) { super(msg, e); } - + } // LogException Index: lutinutil/src/java/org/codelutin/util/LoggingPatternFormatter.java diff -u lutinutil/src/java/org/codelutin/util/LoggingPatternFormatter.java:1.1 lutinutil/src/java/org/codelutin/util/LoggingPatternFormatter.java:1.2 --- lutinutil/src/java/org/codelutin/util/LoggingPatternFormatter.java:1.1 Wed Aug 4 10:01:47 2004 +++ lutinutil/src/java/org/codelutin/util/LoggingPatternFormatter.java Mon Aug 16 15:01:33 2004 @@ -23,13 +23,13 @@ * * @author POUSSIN Benjamin * Copyright Code Lutin -* @version $Revision: 1.1 $ +* @version $Revision: 1.2 $ * -* Mise a jour: $Date: 2004/08/04 10:01:47 $ +* Mise a jour: $Date: 2004/08/16 15:01:33 $ * par : $Author: bpoussin $ */ -package org.codelutin.logging; +package org.codelutin.util; import java.util.logging.Formatter; import java.util.logging.LogRecord;