Gather RPA logs
In case you found no solution to your RPA issue, gather the following logs from the Master server and send to the WorkFusion Support Team for further analysis.
RPA server logs
You can find the RPA server logs at the following location:
$RPA_DIR/logs*$RPA_DIR/nginx/logs/
Master server logs
The Master server logs are located here:
$INSTALL_DIR/supervisord/log/bot-manager.log
$INSTALL_DIR/supervisord/logs/bot-manager.log
JSON-formatted logs
To switch to JSON-formatted logs, do as follows:
Add the dependency to runtime-logger-configurer version 1.0.6 or above.
Configure
logback-spring.xmlwith a JSON file appender and a service name:<?xml version="1.0" encoding="UTF-8"?> <configuration> <property name="JSON_CUSTOM_FIELDS" value='{ "service_name": "bot-agent" }'/> <include resource="com/workfusion/logging/logback-json-spring-boot.xml"/> <root level="INFO"> <appender-ref ref="STDOUT"/> <appender-ref ref="ROLLING_FILE_JSON"/> </root> </configuration>
This standard logback configuration also supports defining profiles for different use cases. For example, it is possible to have a separate profile for production that writes to a JSON file and a profile for developers that uses plain text.
The advantage of using JSON as a log format is its ability to define custom fields, making it easy to filter out unnecessary log parts using Kibana. You can define such fields using logback's MDC variables and static methods, for example:
public void processTask(Task someTask) {
try (MDCVariables mdcVars = MDCVariables.withPrefix("mdc_").put("task_id", someTask.getId()
.put("task_name", someTask.getNsme()) {
// do actual task processing
}
}
Mind that JSON-formatted logs are harder to read when taken directly from the server. You can use utility programs that parse JSON and convert such logs to downloadable plain-text files.