Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No easy way to disable logging of artifact resolution #2

Open
cheddar opened this issue Sep 9, 2013 · 5 comments
Open

No easy way to disable logging of artifact resolution #2

cheddar opened this issue Sep 9, 2013 · 5 comments

Comments

@cheddar
Copy link

cheddar commented Sep 9, 2013

RepositorySystemSessionProvider always attaches

    session.setTransferListener(new ConsoleTransferListener());
    session.setRepositoryListener(new ConsoleRepositoryListener());

To the session. This fills the logs with a bunch of lines about resolutions, which is definitely nice to have in a development/debugging environment, but I'd rather not having it pollute my normal logs.

It would be awesome if it were easier for me to turn these off/plugin my own listeners/something that gives me control. It appears as if overriding the guice binding might be the easiest way to do this, but it's not clear how to override the repositories without having users adjust their settings.xml.

One option might be to make the Guice modules use a Guice Multibinder to inject a Set, then your default module could setup central like it's currently defaulting to and other users could use the Multibinder to add RemoteRepositories to the Set<>.

@cheddar
Copy link
Author

cheddar commented Sep 10, 2013

@jvanzyl
Copy link

jvanzyl commented Sep 10, 2013

I'll take a look tomorrow and make it pluggable.

@jvanzyl
Copy link

jvanzyl commented Sep 11, 2013

Would you be happier with SLF4J integration and you pick your implementation, or allow passing in the two transfer listeners? @electrum, you have an opinion?

@cheddar
Copy link
Author

cheddar commented Sep 11, 2013

Slf4j at a minimum. Overriding the actual listeners seems like a generally
nice thing to allow for the long-term.

--Eric

On Tuesday, September 10, 2013, Jason van Zyl wrote:

Would you be happier with SLF4J integration and you pick your
implementation, or allow passing in the two transfer listeners? @electrumhttps://github.com/electrum,
you have an opinion?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-24206343
.

@electrum
Copy link

I agree that long term having the option to override the listeners is nice, but making the default ones log at debug level is fine for now.

This is probably controversial, but I think libraries should use JUL as that's part of the JDK and thus avoids any classloader or versioning issues. Applications using the library are of course free to bridge JUL into whatever backend they choose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants