You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2016/08/06 11:01:55 UTC

CI of Components...

Hi,

i have a question concerning DI

If I have the following code:

public class XX {

     @Inject
     private ScmManager scmManager;


During the run in Maven this will automatically looked up and injected 
into this attribute...so fine so far...

But is it possible to provide a different logger instance into this 
instead of the default one which loggs on console (info level) so I can 
control the level of output or maybe change to output to log into file 
instead of the console ?


Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: CI of Components...

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Robert,


On 8/6/16 3:27 PM, Robert Scholte wrote:
> Hi Karl Heinz,
>
> the interface and implementation of the logger are separated. It should
> pick up the logger implementation as defined for the Maven runtime. If
> that's not the case, then we have an issue here.

It works as you describe it..no problem.. May be I was not clear enough...
The question was If i could inject somehow an other Logger which is 
redirected to a file instead onto the console which is done by the 
default Logger ?...

But it sounds like it is not easy...may be it does not make really sense 
? I'm just thinking about some options...

Thanks for your answer..


Kind regards
Karl Heinz




>
> thanks,
> Robert
>
> On Sat, 06 Aug 2016 13:01:55 +0200, Karl Heinz Marbaise
> <kh...@gmx.de> wrote:
>
>> Hi,
>>
>> i have a question concerning DI
>>
>> If I have the following code:
>>
>> public class XX {
>>
>>      @Inject
>>      private ScmManager scmManager;
>>
>>
>> During the run in Maven this will automatically looked up and injected
>> into this attribute...so fine so far...
>>
>> But is it possible to provide a different logger instance into this
>> instead of the default one which loggs on console (info level) so I
>> can control the level of output or maybe change to output to log into
>> file instead of the console ?
>>
>>
>> Kind regards
>> Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: CI of Components...

Posted by Robert Scholte <rf...@apache.org>.
Hi Karl Heinz,

the interface and implementation of the logger are separated. It should  
pick up the logger implementation as defined for the Maven runtime. If  
that's not the case, then we have an issue here.

thanks,
Robert

On Sat, 06 Aug 2016 13:01:55 +0200, Karl Heinz Marbaise  
<kh...@gmx.de> wrote:

> Hi,
>
> i have a question concerning DI
>
> If I have the following code:
>
> public class XX {
>
>      @Inject
>      private ScmManager scmManager;
>
>
> During the run in Maven this will automatically looked up and injected  
> into this attribute...so fine so far...
>
> But is it possible to provide a different logger instance into this  
> instead of the default one which loggs on console (info level) so I can  
> control the level of output or maybe change to output to log into file  
> instead of the console ?
>
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: CI of Components...

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Of course the subject should be "DI of Components" ..

Kind regards
Karl Heinz
On 8/6/16 1:01 PM, Karl Heinz Marbaise wrote:
> Hi,
>
> i have a question concerning DI
>
> If I have the following code:
>
> public class XX {
>
>     @Inject
>     private ScmManager scmManager;
>
>
> During the run in Maven this will automatically looked up and injected
> into this attribute...so fine so far...
>
> But is it possible to provide a different logger instance into this
> instead of the default one which loggs on console (info level) so I can
> control the level of output or maybe change to output to log into file
> instead of the console ?
>
>
> Kind regards
> Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org