The Management Console can function as a Log4j socket reader for a resource adapter or a proxy. Consequently, logging output can be sent directly to a Management Console window (see Displaying the logging events in the BeanConnect Management Console .
To configure the Management Console for this, proceed as follows:
Choose the Configure Management Console as Listener command from the context menu of any node in the Logging Configuration panel.
If the Management Console is to wait for logging events at the specified listener port right from the start of any subsequent session, select the Automatically Begin to Listen option on the General tab of the General Diagnostic Info Configuration panel.
BeanConnect resource adapter:
Set the appenderBeanConnectMCSocketAppender
as required in the resource adapter fileBeanConnect.log4j.properties.xml
:The host on which the Management Console is running must be specified in the
RemoteHost
parameter.In the
Port
parameter, you must specify the listener port at which the Management Console waits for logging events from the proxy container.
The Management Console provides a list of all the logging listeners. This can be accessed via the Log4j Logging Listeners node at the topmost level of the navigation tree.
For the proxy, configuration involves the following steps:
If a socket listener port has not yet been entered in the properties of the relevant proxy for this case, the Management Console first asks for this port.
The port is a local listener port and must therefore be different from all the other local listener ports already used on the Management Console's host. However, the Management Console can only check whether the ports entered are unique by referring to its own data and is subject to the same constraint when enforcing uniqueness. Listener ports used by other applications on the host cannot be checked by the Management Console. The user has to check that they are unique.
After the port has been entered, the Management Console checks whether the following appenders exist in the logging configuration of the proxy:
an async appender with the name
BeanConnectManagementConsole
a socket appender with the name
BeanConnectMCSocketAppender
If these appenders are missing, they are created by the Management Console. If they exist, certain parameters of the appenders are checked and set appropriately.
The Management Console assigns the
BeanConnectManagementConsole
appender to the loggersBeanConnect
andde.siemens
(if they exist). Consequently, logging events are output to the Management Console via these two loggers or via loggers that inherit the appenders from these two loggers.The Management Console activates logging for the current session and waits for logging events at the specified listener port.
Changing a listener port
To change the socket listener port subsequently, proceed as follows:
Click Advanced Features - Diagnosis - Configuration - General Diagnostic Info in the navigation tree of the proxy and enter the MC Logging Listener Port.
This change does not take effect until the proxy is started again or saved and reloaded (Save/Restart - Save & Restart command in the context menu of the proxy).