280 Using the Port Forwarder APIpublic void log(final int logLevel, final int logCode,final Object[] params, final Throwable throwable) {if ((logLevel == PortForwarderConstants.LOG_LEVEL_ERROR) ||(logLevel == PortForwarderConstants.LOG_LEVEL_INFO)) {String msg =MessageFormat.format(messages.getString("" + logCode),params);String messageString = createMessage(msg);if (portForwarderGui == null) {System.err.println("WARNING: Could not write to info area!");System.err.println(messageString);if (throwable != null) {System.out.println(throwable.getMessage());throwable.printStackTrace();}} else {portForwarderGui.appendInfo(messageString +System.getProperty("line.separator"));if (throwable != null) {portForwarderGui.appendInfo(throwable.getMessage() +System.getProperty("line.separator"));throwable.printStackTrace();}}}}public void log(final int logLevel, final String msg,final Throwable throwable) {if (logLevel != PortForwarderConstants.LOG_LEVEL_DEBUG_VERBOSE) {String messageString = createMessage(msg);if (portForwarderGui == null) {System.err.println("WARNING: Could not write to info area!");System.err.println(messageString);if (throwable != null) {System.out.println(throwable.getMessage());throwable.printStackTrace();}} else {portForwarderGui.appendInfo(messageString +System.getProperty("line.separator"));if (throwable != null) {portForwarderGui.appendInfo(throwable.getMessage() +System.getProperty("line.separator"));throwable.printStackTrace();}Nortel VPN GatewayUser GuideNN46120-104 02.01 Standard14 April 2008Copyright © 2007-2008 Nortel Networks.