Page 1 of 1

Separate engine and modules error logs

Posted: Wed Sep 21, 2011 1:57 pm
by Grey
As per title. Sometimes it can be hard finding the relevant module output between all the engine loading stuff. Or perhaps suppress the output for the boot module, since it all seems to work fine anyway.

Re: Separate engine and modules error logs

Posted: Wed Sep 21, 2011 2:51 pm
by tiger_eye
Grey, I suggest making the output of your module grep-able from the main log. Make your own module print function as below:

Code: Select all

mprint = function(...)
    print("[MY_MODULE]", ...)
end
and use "mprint" in your module instead of "print". This allows you to do `grep '[MY_MODULE]' te4_log.txt` to see all the module-related output.

Re: Separate engine and modules error logs

Posted: Wed Sep 21, 2011 3:06 pm
by Grey
And what the frell is grep?

(Actually I sorta know what it is, and quite specifically know it's not available to me.)

Re: Separate engine and modules error logs

Posted: Wed Sep 21, 2011 3:31 pm
by reverend
grep outputs (in this case) just the lines that meet the condition. On Windows, you can use an editor like Notepad++ - it's search-in-files function works quite similar, if a bit uglier.

Re: Separate engine and modules error logs

Posted: Thu Sep 22, 2011 12:45 am
by budswell
A little rough but this could also help
http://www.wingrep.com/