Please add a 'ShowSource' option to the Formatter class

25 views
Skip to first unread message

israel sadeh

unread,
Mar 14, 2012, 12:46:57 PM3/14/12
to Logog
Hi,

Currently (as far as I understand) the only way to disable the
printing of the file name and line number are by overriding the
Formatter class.
Since these disabling is quite common, I suggest adding the following
methods to the Formatter class:
SetShowFileNameAndLine()
GetShowFileNameAndLine()
(just like it is oalready done regarding showing the time).

Thanks.

John Byrd

unread,
Mar 14, 2012, 4:36:57 PM3/14/12
to lo...@googlegroups.com
Hi Israel,

I acknowledge that people will want to format their output in many different ways.  This was the original intention of the Formatter class, so that you can simply instantiate a custom formatter and render the log output in whatever format you like.

In order to make your specific example easier, I just implemented a GetTopicFlags() functions in the default Formatter which can be overridden by child classes.  Additionally, I wrote a complete example that shows how to use this function to do exactly what you're requesting.

Please see  http://johnwbyrd.github.com/logog/customformatting.html  , download the latest code, and let me know if that works for you.  Thanks.

jwb


--
You received this message because you are subscribed to the Google Groups "Logog" group.
To post to this group, send email to lo...@googlegroups.com.
To unsubscribe from this group, send email to logog+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/logog?hl=en.




--
---

John Byrd
Gigantic Software
2102 Business Center Drive
Suite 210-D
Irvine, CA   92612-1001
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850

Israel Sadeh

unread,
Mar 19, 2012, 4:25:50 AM3/19/12
to lo...@googlegroups.com

Thanks.

 

It works good for me.

 

Israel

Reply all
Reply to author
Forward
0 new messages