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 an executor logger, a
class implementing the
In the previous examples, we have not provided any
execution logger when executing robots, which means that the default
ExecutorLogger that will write to system out
will be used. Let's see how the
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
IExecutorLogger 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