Several classes in RXOP can be considered main entry points into specific RXOP functionality. Examples of these main entry points would be classes such as ricoh.rxop.rxfw.RicohFwDevice
for rxFW and ricoh.rxop.rxinst.RicohJavaDevice
for rxInst. When using these entry points in applications it is sometimes necessary to not only capture your application logs, but also the relevant RXOP library logs. This can give you insight into the internal workings of RXOP and is also crucial for RiDP to assist with problem solving when something does not appear to be working correctly.
RiDP strongly suggest that your RXOP application be designed with a way to capture the RXOP logs at the DEBUG level as a compile-time or runtime option.
It is very easy to enable RXOP library logging in your application because each of these main classes has exposed some static helper methods related to logging. Check the RXOP API documents for the RXOP module you are implementing to see the full list of public methods and signatures, but some examples are:
static void setUseLogging(boolean)
static void setWorkPath(String)
Once instantiated, these objects have access to a variety of methods for setting the logging level, fetching the concrete logger, and convenience methods for writing to the log:
public void setLogLevel(org.apache.logging.log4j.Level)
public boolean isLogging()
public void debug(org.apache.logging.log4j.Logger logger)
As an example of how to enable full DEBUG logging, including any output written to the log by RXOP itself, a naïve implementation for RicohJavaDevice
might look like this:
RicohJavaDevice.setUseLogging(true); // enable log
RicohJavaDevice.setWorkPath("c:\\temp\\test"); // log output location
RicohJavaDevice device =
RicohJavaDevice.CreateDevice(IP, "XXX", "YYY", "ZZZ", defaultRetryHandler,defaultRetryHandler, true);
device.setLogLevel(Level.DEBUG); // set log level
Of course, your own application may require a more sophisticated logger configuration. However, if you ever need to get quick access to RXOP library internal logging messages, this snippet will work with most of the main RXOP classes. (Again, check the public API documentation to see which public classes offer access to logging functionality.)
Note that as of this writing RXOP uses Log4j v2 as its concrete logger implementation. An RXOP application is free to use this Log4j Logger instance for its own logging.