Page 1 of 1

Log lines with stderr

Posted: Wed Aug 28, 2013 12:51 am
by xeon
Guys, I've noticed that in 099 I have some log lines that is written to the stderr, instead of the stdout. This is somewhat uncomfortable, as I had to use a 3rd party utility to create the POL service, with the ability to redirect the stderr to file.
It would be nice to have or this feature included in pol config file ("write stderr to this file") or simply write all log lines to stdout.

An example log line written to stderr:
Warning! scripts/control/applyhitscrip.ecl does not exist!
WARNING: scripts/misc/dblclickself.ecl: Unable to find module npc
First line is a typo error in a config, second line is the "use npc;" error I've written in another thread here in the forum.

Re: Log lines with stderr

Posted: Wed Sep 17, 2014 5:54 am
by tomtommy

Re: Log lines with stderr

Posted: Wed Sep 17, 2014 3:18 pm
by kevin
There are several logging scenarios within pol:
// log into pol.log and std::cout
// log into pol.log
// log only into std::cout
// log only into std::cout if level is equal or higher
// log only into std::cerr
// log into script.log
// log into debug.log (if enabled)
// log into leak.log
You can easily redirect stdout and stderr to files (or nothing) using simple I/O redirection (Windows and Linux). Since this is possible with basic OS tools, this is low priority.