Sadly, log4j2 doesn't control all the logging in the Cyc server.
I just tried this method out, and it works pretty well:
If you're trying to observe the traffic between the application and the Cyc server, you can get a log of all the activity that goes through the binary CFASL port (the one used by the APIs).
To turn on API logging, do the following:
- Set the task-processor logging level:
(set-task-processor-verbosity 2)
- Tell it where to log:
To log to a file, evaluate the following, with a path that makes sense for your install (i.e. one that the server process will have write privileges for):
(clet ((path (format-nil "/home/USER/cyc-api-~A.log" (cyc-image-id))))
(set-tpool-background-msg-path path))
To log to the Cyc server console, evaluate this code:
(csetq *tpool-background-msg-stream* *standard-output*)
Any of this code can be evaluated automatically at startup by putting it in the file init/release-specific-init.lisp
Alternatively, these forms can be evaluated at run-time from the console or from the SubL Interactor (a tool in the Cyc browser). You can also re-evaluate any of this code at run-time for immediate changes to the logging.
Note that the task-processors run asynchronously, so you'll see one entry for the request, and another entry in the log for the response. They can be matched up by looking at the request IDs.