Arvind Upadhyay
Arvind Upadhyay

Reputation: 11

Exception for the log settings while starting CYC instance

I have been trying to get the logging working on cyc server side for any interaction with the clients(api/cycKB browser)....havn't been successful yet..

Here is the exception i get...Not sure what is wrong with json file (log4j2.json) http://pastebin.com/2CJJEbDB (Log contents)

Here are the contents of log4j2.json file http://pastebin.com/MKZA0R3d

Can someone point our the mistake here?

Upvotes: 0

Views: 66

Answers (3)

Chris
Chris

Reputation: 1

You can enable browser logging to standard output (the console) via setting MONITOR-HTML-ACTION to t.

e.g.

(csetq *MONITOR-HTML-ACTION* t)

Evaluating this at the prompt, SubL Interactor or placing this in a system initialization file will log the URL portion of each HTTP request to standard output

Upvotes: 0

KnowsStuff
KnowsStuff

Reputation: 100

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:

  1. Set the task-processor logging level:

(set-task-processor-verbosity 2)

  1. 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.

Upvotes: 0

rgoers
rgoers

Reputation: 9151

From the error it seems log4j thinks you file contains XML, probably because there is a comma in the name.

Upvotes: 0

Related Questions