Apama Documentation : Connecting Apama Applications to External Components : Working with Connectivity Plug-ins : Developing connectivity plug-ins : Logging and configuration
Logging and configuration
For Java plug-ins, the plug-in's constructor is passed a configuration object, the chain name and a logger object. The Abstract classes supplied store these as members (the logger object is named LOGGER).
For C++ plug-ins, the Abstract classes have a LOGGER member with methods to log at log levels from TRACE to CRIT, with a printf format and variadic arguments. Expensive computations can be predicated on a check of is<Level>Enabled().
Plug-ins should use the log4j Logger object provided for logging. You should avoid using System.out or System.err for logging. Logging from chains includes the chain's name in the correlator log file, so it is not required to identify the chain in every log statement.
The configuration contains the definitions from the configuration file for connectivity plug-ins (any globalConfig is merged with the per-chain configuration so that the per-chain configuration takes precedence). The configuration is a map with String keys. The values will be one of the following classes:
*List<Object> (for C++, data_t of type list_t) for list YAML entries. Each element will be one of these types.
*Map<String, Object> (for C++, data_t of type map_t) for map YAML entries. Each value will be one of these types.
*String (for C++, data_t of type const char *). Even if the entry in the configuration file is numeric or a boolean, it will be provided as a string. Plug-ins can use the MapHelper class to obtain numeric or boolean flags.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback