KX Academy
Q+A on KX Academy, training sandboxes and Capstone projects
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Resolved! How do I make logging continue?

I am currently learning how to use bash script and q together, to route stdout and stderrHere is my logging q file, called logger.q///////////////.log.out: {-1 x};.log.err: {-2 x};.z.ts:{.log.out[(string[.z.P]," Out\n")];.log.err[(string[.z.P]," Erro...

Mannix by New Contributor III
  • 3 replies
  • 0 kudos

Resolved! 1 \"hello\" return hello1

Why does: q)1 \"hello\"hello1I have checked that: 2 "hello" returns hello2.I know that 1 and 2 are permanent handles to stdout and stderr, but I'm not sure why the handles would be returned after the string.

Mannix by New Contributor III
  • 2 replies
  • 0 kudos

Resolved! Does -2 log messages?

In the line from the standard tick setup:if[0<=type i;-2 (string L)," is a corrupt log. Truncate to length ",(string last i)," and restart";exit 1];hopen L};What is -2 doing? I assume it logs the message? Where does it log the message to? Is this -2 ...

Mannix by New Contributor III
  • 1 replies
  • 0 kudos