Logging internally in GIL is done using the Apache log4j framework. log4j is also the preferred way to log when developing adapters and transfer pipeline stages. There are some conventions to be aware of.
log4j is configured in the gil.config.xml file by altering the 'log4j:configuration' section. For details please see the log4j documentation.
As default, the config file configures the FileAppender to direct log files to the 'logfiles' folder located in the GIL folder. This has it's meaning since GIL looks in the 'logfiles' folder and makes the files accessible via the GIL web interface and the http API.
When instantiating logger objects in your sorce code, use the class name as the logger name.
private static Logger _logger = Logger.getLogger(ExampleESAdapter.class);
This makes it easy to configure loggers for a certain package or class. For example, this is how you change the log level for the example ES-adapter to the 'debug' level in the gil.config.xml file.
<logger name="gil.io.example.ExampleESAdapter"> <level value="debug"/> </logger>