Dazzler95
Dazzler95

Reputation: 93

How to get tickerplant to write logfile?

I have a tickerplant set up with two tables, trade and quote. I can set up a sample feedhandler on the correct port to get data flowing on a timer into trade and quote. When I start up the tickerplant, I initiate the schema for the tables, list the directory of the logfile and set the port. What am I missing in order for the tickerplant to write the updates to trade and quote down to the logfile?

Upvotes: 0

Views: 312

Answers (2)

Sam McMillen
Sam McMillen

Reputation: 296

Provided the schema have been defined correctly, when starting up the tickerplant with

>q tick.q sym hdb -p 1234

sym is the name of the schema to be used and hdb the directory that the HDB should be stored in. Without the sym argument, the tickerplant will run without creating a log file. Could this be the problem? Otherwise the path to the log file can be found using .u.L

Without seeing any code its hard to diagnose, maybe you could clarify the problem?

Upvotes: 2

jomahony
jomahony

Reputation: 1692

Create logfile:

.[`:logfile;();:;()]

Open handle to logfile:

h:hopen `:logfile

Whenever a trade or quote message is received write a message to the logfile handle before publishing:

h enlist (`upd;`t;([]a:1 2 3))

Message is of the form:

 h enlist (update function name; table name; table data received)

Upvotes: 2

Related Questions