Grape log/output when using annotations

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Grape log/output when using annotations

gregoryjoseph
Hi,

I'm trying to get interesting logs out of grapes/ivy
i have this: groovy.grape.Grape.instance.ivyInstance.loggerEngine.setDefaultLogger(new util.ColoredIvyLogger()) which "works", I think, if I use Grape.grab(). If I use annotations, they're processed before this can happen, and GrapeIvy shuts the logging output of ivy completely.
It's not too bad, cause I'd rather have nothing than the garbage that ivy outputs, but I'd also like my users to not have to wait for long seconds in front of an unresponsive script.

Can anyone think of any way that would have grape output a minimal status/progress, so the user gets immediate feedback on startup of the script, and quick start with no extra logging on subsequent executions ? ("Downloading x...", nothing else, progress marks would be good too of course)

I was hoping setting initClass=false on the @Grab's would defer the resolving, but it looks like it doesnt.

Any tip, thought, idea would be appreciated !

Cheers,

-greg
Reply | Threaded
Open this post in threaded view
|

Re: Grape log/output when using annotations

Guillaume Laforge-4
Hi,

JIRA's offline at the moment, but I remember a JIRA issue on the topic.
Paul submitted a potential patch around this idea that could be of help.
With JIRA down, the details escape me, but when it's back up, you may
wish to have a look at the ticket and perhaps have a go at the patch
to see if it's doing what you're looking for.

Guillaume

On Fri, Apr 16, 2010 at 00:54, gregoryjoseph
<[hidden email]> wrote:

>
> Hi,
>
> I'm trying to get interesting logs out of grapes/ivy
> i have this:
> groovy.grape.Grape.instance.ivyInstance.loggerEngine.setDefaultLogger(new
> util.ColoredIvyLogger()) which "works", I think, if I use Grape.grab(). If I
> use annotations, they're processed before this can happen, and GrapeIvy
> shuts the logging output of ivy completely.
> It's not too bad, cause I'd rather have nothing than the garbage that ivy
> outputs, but I'd also like my users to not have to wait for long seconds in
> front of an unresponsive script.
>
> Can anyone think of any way that would have grape output a minimal
> status/progress, so the user gets immediate feedback on startup of the
> script, and quick start with no extra logging on subsequent executions ?
> ("Downloading x...", nothing else, progress marks would be good too of
> course)
>
> I was hoping setting initClass=false on the @Grab's would defer the
> resolving, but it looks like it doesnt.
>
> Any tip, thought, idea would be appreciated !
>
> Cheers,
>
> -greg
> --
> View this message in context: http://old.nabble.com/Grape-log-output-when-using-annotations-tp28261518p28261518.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grape log/output when using annotations

gregoryjoseph
Thanks Guillaume, found it: http://jira.codehaus.org/browse/GROOVY-4014

Paul's patch isn't that useful, if it gives the feedback after the fact, but I'll look into what Sebastian did, too.

Cheers,

-g
Guillaume Laforge-2 wrote
Hi,

JIRA's offline at the moment, but I remember a JIRA issue on the topic.
Paul submitted a potential patch around this idea that could be of help.
With JIRA down, the details escape me, but when it's back up, you may
wish to have a look at the ticket and perhaps have a go at the patch
to see if it's doing what you're looking for.

Guillaume

On Fri, Apr 16, 2010 at 00:54, gregoryjoseph
<gregory.joseph@magnolia-cms.com> wrote:
>
> Hi,
>
> I'm trying to get interesting logs out of grapes/ivy
> i have this:
> groovy.grape.Grape.instance.ivyInstance.loggerEngine.setDefaultLogger(new
> util.ColoredIvyLogger()) which "works", I think, if I use Grape.grab(). If I
> use annotations, they're processed before this can happen, and GrapeIvy
> shuts the logging output of ivy completely.
> It's not too bad, cause I'd rather have nothing than the garbage that ivy
> outputs, but I'd also like my users to not have to wait for long seconds in
> front of an unresponsive script.
>
> Can anyone think of any way that would have grape output a minimal
> status/progress, so the user gets immediate feedback on startup of the
> script, and quick start with no extra logging on subsequent executions ?
> ("Downloading x...", nothing else, progress marks would be good too of
> course)
>
> I was hoping setting initClass=false on the @Grab's would defer the
> resolving, but it looks like it doesnt.
>
> Any tip, thought, idea would be appreciated !
>
> Cheers,
>
> -greg
> --
> View this message in context: http://old.nabble.com/Grape-log-output-when-using-annotations-tp28261518p28261518.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Grape log/output when using annotations

Guillaume Laforge-4
Please report back your findings, this is interesting and worth investigating.

On Fri, Apr 16, 2010 at 16:09, gregoryjoseph
<[hidden email]> wrote:

>
> Thanks Guillaume, found it: http://jira.codehaus.org/browse/GROOVY-4014
>
> Paul's patch isn't that useful, if it gives the feedback after the fact, but
> I'll look into what Sebastian did, too.
>
> Cheers,
>
> -g
>
> Guillaume Laforge-2 wrote:
>>
>> Hi,
>>
>> JIRA's offline at the moment, but I remember a JIRA issue on the topic.
>> Paul submitted a potential patch around this idea that could be of help.
>> With JIRA down, the details escape me, but when it's back up, you may
>> wish to have a look at the ticket and perhaps have a go at the patch
>> to see if it's doing what you're looking for.
>>
>> Guillaume
>>
>> On Fri, Apr 16, 2010 at 00:54, gregoryjoseph
>> <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to get interesting logs out of grapes/ivy
>>> i have this:
>>> groovy.grape.Grape.instance.ivyInstance.loggerEngine.setDefaultLogger(new
>>> util.ColoredIvyLogger()) which "works", I think, if I use Grape.grab().
>>> If I
>>> use annotations, they're processed before this can happen, and GrapeIvy
>>> shuts the logging output of ivy completely.
>>> It's not too bad, cause I'd rather have nothing than the garbage that ivy
>>> outputs, but I'd also like my users to not have to wait for long seconds
>>> in
>>> front of an unresponsive script.
>>>
>>> Can anyone think of any way that would have grape output a minimal
>>> status/progress, so the user gets immediate feedback on startup of the
>>> script, and quick start with no extra logging on subsequent executions ?
>>> ("Downloading x...", nothing else, progress marks would be good too of
>>> course)
>>>
>>> I was hoping setting initClass=false on the @Grab's would defer the
>>> resolving, but it looks like it doesnt.
>>>
>>> Any tip, thought, idea would be appreciated !
>>>
>>> Cheers,
>>>
>>> -greg
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Grape-log-output-when-using-annotations-tp28261518p28261518.html
>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Groovy Project Manager
>> Head of Groovy Development at SpringSource
>> http://www.springsource.com/g2one
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Grape-log-output-when-using-annotations-tp28261518p28267361.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email