Joel, I'll take a look at it.
The overhead is acceptable since I make sure that we only pay the price if tracing is actually enabled. I'm hoping that the log API in incubator or the one from Fred will end up in the main GWT someday ? In that case it would be a very useful if it could auto-deduce the source of the log/trace event. David On Nov 6, 3:27 pm, Joel Webber <[email protected]> wrote: > It wouldn't be perfect, but you might be able to get some utility from the > code in StackTraceCreator (in the Core module) in the 2.0 release branch. It > can't get stack traces on all browsers by default (IE requires an extra flag > that generates a fair amount of overhead -- don't use lightly), but could > help somewhat. > > On Fri, Nov 6, 2009 at 5:22 AM, Miroslav Pokorny <[email protected] > > > > > wrote: > > Why not just include the class.method name at the start of each and every > > message String sent to your logging method...Its a pain but it works. > > > On Fri, Nov 6, 2009 at 7:06 PM, stuckagain <[email protected]> wrote: > > >> Hi, > > >> Would it be possible to implement a Trace mechanism that (when > >> enabled) would be able to autodetermine from where it is called > >> (classname.method). In plain java I have such a thing implemented in > >> my tracing package and it really helps in keeping trace statements > >> really simple. > > >> In the GWT client I'm using the incubator log API (I also tried out > >> gwt-log from Fred), but none of the log/trace packages that exist > >> today are able to detect from where they are called to give a better > >> output. > > >> It looks to me that I will actually need compiler support to be able > >> to implement such a thing. > > >> I read in this newsgroup that there is work going on to make > >> stacktraces available in the browser. Could that mechanism be reused > >> to implement what I need ? (In plain Java I get the stacktrace and > >> find the stack element just before the trace statement). > > >> David > > > -- > > mP- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
