Stop recording line numbers in Guice 4

76 views
Skip to first unread message

Dominik Obermaier

unread,
May 8, 2015, 4:55:09 AM5/8/15
to google...@googlegroups.com
First of all, congrats for the 4.0 release!

I read the inofficial release notes in one of the threads on this Google Group [1] and this point in particular would be very interesting for me: 

 * Add the ability to to stop recording line numbers of bindings, which can increase startup time drastically (at the expense of less useful error messages).


So my question is: How do I tell Guice to stop recording the line numbers on startup? I browsed the JDiff reports without any success in finding that option.

Thanks a lot!
Dominik


Sam Berlin

unread,
May 8, 2015, 8:06:00 AM5/8/15
to google...@googlegroups.com
Stack trace processing is controlled by the "guice_include_stack_traces" system property, with valid values OFF, ONLY_FOR_DECLARING_SOURCE [the default], and COMPLETE.  (Though, to be honest right now, I can't remember how COMPLETE differs from the default.)

sam





--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/6c9ac885-289d-4fe2-a855-379effe90448%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dominik Obermaier

unread,
May 8, 2015, 8:51:09 AM5/8/15
to google...@googlegroups.com, Sam Berlin
Hi Sam,

thanks a lot, this works perfectly. The startup times are reduced significantly when using the OFF option.

Best,
Dominik
You received this message because you are subscribed to a topic in the Google Groups "google-guice" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-guice/bAaOn_5MSBU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-guice...@googlegroups.com.

To post to this group, send email to google...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice.

Bob Lee

unread,
May 8, 2015, 12:24:32 PM5/8/15
to Guice Mailing List
FWIW, in older versions of Guice you can just use binder.withSource("unknown").

Bob

--
Reply all
Reply to author
Forward
0 new messages