When you execute a request, the execute method will throw an
exception if a robot generates an error. Other types of errors and
warnings are reported through the
In the previous examples, we have not provided any
ExecutionLogger when executing robots, which means means we
get the default implementation that will write to system out. Let's see
ExecutorLogger will report if one of our
RoboServers goes offline.
The example configures a cluster with a RoboServer which is not online.
ExecutorLogger, offline server example
If you run this example if should print the following to the console:
ExecutorLogger, offline RoboServer console output
Often you don't want to have your application writing directly to
System.out, in that case you can provide a different
ExecutorLogger implementation, you can do so when
registering the cluster, like this
This example uses the
DebugExecutorLogger() which will also print to
System.out, but only if the API debugging is enabled.
Alternative you can provide your own implementation of the
ExecutorLogger, to control how error messages should be
handled. Check the
JavaDoc for additional details.