[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Indexable functions
- From: Patrick Donnelly <batrick@...>
- Date: Sat, 20 Oct 2012 00:01:13 -0400
On Fri, Oct 19, 2012 at 11:43 PM, Rena <hyperhacker@gmail.com> wrote:
> I've been working with a system that expects me to output binary data
> to stdout, and I realized it'd be a good idea to replace print() with
> a function that writes to some other file (stderr seems like a good
> choice) so that it can still be used for debugging.
I don't think print was every intended for debugging. There's also
nothing magical about it...
> The problem that occurs to me is that print() does a bit of magic to
> align things nicely to columns (it looks more complex than just
> appending a tab to everything?) and I'm not sure how that works.
http://www.lua.org/source/5.2/lbaselib.c.html#luaB_print
Leave print alone and make a custom log function? There are many
logging libraries in the wild to hunt for.
--
- Patrick Donnelly