src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
     1.1 --- a/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java	Thu Apr 04 19:05:24 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java	Tue Apr 09 14:51:13 2013 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -31,7 +31,7 @@
    1.11  import java.util.logging.Level;
    1.12  
    1.13  /**
    1.14 - * This is a helper class that provides some conveniece methods wrapped around the
    1.15 + * This is a helper class that provides some convenience methods wrapped around the
    1.16   * standard {@link java.util.logging.Logger} interface.
    1.17   *
    1.18   * The class also makes sure that logger names of each Metro subsystem are consistent
    1.19 @@ -129,6 +129,20 @@
    1.20          logger.logp(level, componentClassName, getCallerMethodName(), message);
    1.21      }
    1.22  
    1.23 +    public void log(final Level level, final String message, Object param1) {
    1.24 +        if (!this.logger.isLoggable(level)) {
    1.25 +            return;
    1.26 +        }
    1.27 +        logger.logp(level, componentClassName, getCallerMethodName(), message, param1);
    1.28 +    }
    1.29 +
    1.30 +    public void log(final Level level, final String message, Object[] params) {
    1.31 +        if (!this.logger.isLoggable(level)) {
    1.32 +            return;
    1.33 +        }
    1.34 +        logger.logp(level, componentClassName, getCallerMethodName(), message, params);
    1.35 +    }
    1.36 +
    1.37      public void log(final Level level, final String message, final Throwable thrown) {
    1.38          if (!this.logger.isLoggable(level)) {
    1.39              return;
    1.40 @@ -143,6 +157,13 @@
    1.41          logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message);
    1.42      }
    1.43  
    1.44 +    public void finest(final String message, Object[] params) {
    1.45 +        if (!this.logger.isLoggable(Level.FINEST)) {
    1.46 +            return;
    1.47 +        }
    1.48 +        logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message, params);
    1.49 +    }
    1.50 +
    1.51      public void finest(final String message, final Throwable thrown) {
    1.52          if (!this.logger.isLoggable(Level.FINEST)) {
    1.53              return;
    1.54 @@ -157,6 +178,13 @@
    1.55          logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message);
    1.56      }
    1.57  
    1.58 +    public void finer(final String message, Object[] params) {
    1.59 +        if (!this.logger.isLoggable(Level.FINER)) {
    1.60 +            return;
    1.61 +        }
    1.62 +        logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message, params);
    1.63 +    }
    1.64 +
    1.65      public void finer(final String message, final Throwable thrown) {
    1.66          if (!this.logger.isLoggable(Level.FINER)) {
    1.67              return;
    1.68 @@ -185,6 +213,13 @@
    1.69          logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message);
    1.70      }
    1.71  
    1.72 +    public void info(final String message, Object[] params) {
    1.73 +        if (!this.logger.isLoggable(Level.INFO)) {
    1.74 +            return;
    1.75 +        }
    1.76 +        logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message, params);
    1.77 +    }
    1.78 +
    1.79      public void info(final String message, final Throwable thrown) {
    1.80          if (!this.logger.isLoggable(Level.INFO)) {
    1.81              return;
    1.82 @@ -199,6 +234,13 @@
    1.83          logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message);
    1.84      }
    1.85  
    1.86 +    public void config(final String message, Object[] params) {
    1.87 +        if (!this.logger.isLoggable(Level.CONFIG)) {
    1.88 +            return;
    1.89 +        }
    1.90 +        logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message, params);
    1.91 +    }
    1.92 +
    1.93      public void config(final String message, final Throwable thrown) {
    1.94          if (!this.logger.isLoggable(Level.CONFIG)) {
    1.95              return;
    1.96 @@ -213,6 +255,13 @@
    1.97          logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message);
    1.98      }
    1.99  
   1.100 +    public void warning(final String message, Object[] params) {
   1.101 +        if (!this.logger.isLoggable(Level.WARNING)) {
   1.102 +            return;
   1.103 +        }
   1.104 +        logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message, params);
   1.105 +    }
   1.106 +
   1.107      public void warning(final String message, final Throwable thrown) {
   1.108          if (!this.logger.isLoggable(Level.WARNING)) {
   1.109              return;
   1.110 @@ -227,6 +276,13 @@
   1.111          logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message);
   1.112      }
   1.113  
   1.114 +    public void severe(final String message, Object[] params) {
   1.115 +        if (!this.logger.isLoggable(Level.SEVERE)) {
   1.116 +            return;
   1.117 +        }
   1.118 +        logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message, params);
   1.119 +    }
   1.120 +
   1.121      public void severe(final String message, final Throwable thrown) {
   1.122          if (!this.logger.isLoggable(Level.SEVERE)) {
   1.123              return;

mercurial