@Override
public void logDebug (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().debug(message);
}
@Override
public void logDebug (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().debug(message, cause);
}
@Override
public void logError (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().error(message);
}
@Override
public void logError (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().error(message, cause);
}
@Override
public void logException (final Throwable throwable) {
+ // Validate parameter
+ if (null == throwable) {
+ // Throw NPE again
+ throw new NullPointerException("throwable is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().catching(throwable);
}
@Override
public void logFatal (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().fatal(message, cause);
}
@Override
public void logFatal (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().fatal(message);
}
@Override
public void logInfo (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().info(message);
}
@Override
public void logInfo (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().info(message, cause);
}
@Override
public void logTrace (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().trace(message);
}
@Override
public void logTrace (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().trace(message, cause);
}
@Override
public void logWarning (final String message) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().warn(message);
}
@Override
public void logWarning (final String message, final Throwable cause) {
+ // Validate parameters
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (message.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("message is empty"); //NOI18N
+ } else if (null == cause) {
+ // Throw NPE again
+ throw new NullPointerException("cause is null"); //NOI18N
+ }
+
// Deligate to logger
this.getLogger().warn(message, cause);
}