com.microfocus.cobol.connector.transport
Class BINPConsoleLogger

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended bycom.microfocus.cobol.connector.transport.BINPConsoleLogger
All Implemented Interfaces:
Appender, OptionHandler

public class BINPConsoleLogger
extends AppenderSkeleton

log4j console logger, allows connector messages to be send to enterprise server

Copyright: Copyright (c) 2002-2003 Company: Micro Focus International Ltd


Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
BINPConsoleLogger()
          Constructor declaration
 
Method Summary
 void activateOptions()
          Connect to the specified RemoteHost and Port.
 void append(LoggingEvent event)
          Method declaration
 void cleanUp()
          Drop the connection to the remote host and release the underlying connector thread if it has been created
 void close()
          Close this appender.
 boolean getLocationInfo()
          Returns value of the LocationInfo option.
 int getPort()
          Returns value of the Port option.
 String getRemoteHost()
          Returns value of the RemoteHost option.
 boolean requiresLayout()
          The SocketAppender does not use a layout.
 void setLayout(Layout layout)
          Method declaration
 void setLocationInfo(boolean locationInfo)
          The LocationInfo option takes a boolean value.
 void setPort(int port)
          The Port option takes a positive integer representing the port where the server is waiting for connections.
 void setRemoteHost(String host)
          The RemoteHost option takes a string value which should be the host name of the server where a SocketNode is running.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BINPConsoleLogger

public BINPConsoleLogger()
Constructor declaration

Method Detail

activateOptions

public void activateOptions()
Connect to the specified RemoteHost and Port.

Specified by:
activateOptions in interface OptionHandler
Overrides:
activateOptions in class AppenderSkeleton

close

public void close()
Close this appender.

This will mark the appender as closed and call then cleanUp() method.


cleanUp

public void cleanUp()
Drop the connection to the remote host and release the underlying connector thread if it has been created


append

public void append(LoggingEvent event)
Method declaration

Specified by:
append in class AppenderSkeleton
Parameters:
event -

requiresLayout

public boolean requiresLayout()
The SocketAppender does not use a layout. Hence, this method returns false.


setRemoteHost

public void setRemoteHost(String host)
The RemoteHost option takes a string value which should be the host name of the server where a SocketNode is running.


getRemoteHost

public String getRemoteHost()
Returns value of the RemoteHost option.


setPort

public void setPort(int port)
The Port option takes a positive integer representing the port where the server is waiting for connections.


getPort

public int getPort()
Returns value of the Port option.


setLocationInfo

public void setLocationInfo(boolean locationInfo)
The LocationInfo option takes a boolean value. If true, the information sent to the remote host will include location information. By default no location information is sent to the server.


getLocationInfo

public boolean getLocationInfo()
Returns value of the LocationInfo option.


setLayout

public void setLayout(Layout layout)
Method declaration

Specified by:
setLayout in interface Appender
Overrides:
setLayout in class AppenderSkeleton
Parameters:
layout -



Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.