Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Log4j config in xebium jar #13

Closed
bvklingeren opened this issue May 26, 2011 · 16 comments
Closed

Log4j config in xebium jar #13

bvklingeren opened this issue May 26, 2011 · 16 comments
Labels

Comments

@bvklingeren
Copy link
Contributor

Please remove the log4j.properties from the src/main/resources directory for it is packaged with the final jar. This pollutes the logs of software using Xebium.

@amolenaar
Copy link
Member

Fixed. The file was not even used.

@amolenaar
Copy link
Member

One thing: The SeleniumDriverFixture currently has a static "BasicConfigurator.configure()" statement.

I suppose both Xebium and SUT are not executed in the same JVM?

@bvklingeren
Copy link
Contributor Author

They sometimes are executed in the same JVM. We have some mixed tests where our Fitnesse fixtures are executing some tasks that are usually executed by a scheduler and we use Xebium to see if the results are visible.
But our software has it's own logging configuration. so I would not expect that the SeleniumDriverFixture to start up its own loggers. Maybe we should kill/enhance that feature?

@barend
Copy link

barend commented May 27, 2011

Xebium is a plugin, not a stand-alone app. It should therefore not change anything at all in the logging configuration IMO.

@amolenaar amolenaar reopened this May 27, 2011
@amolenaar
Copy link
Member

Agreed, but if log4j is not given some sort of configuration, you'll end up having only a

log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.SingleClientConnManager).
log4j:WARN Please initialize the log4j system properly.

message in the log output. What would be wise? Use slf4j or something? Create a fixture call to set up logging (Yuk!)?

@bvklingeren
Copy link
Contributor Author

I would indeed migrate to slf4j in the first place so users can decide
for themselves what kind of logger they are using. Let's see how
things are if that's done.

2011/5/27 amolenaar
reply@reply.github.com:

Agreed, but if log4j is not given some sort of configuration, you'll end up having only a

   log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.SingleClientConnManager).
   log4j:WARN Please initialize the log4j system properly.

message in the log output. What would be wise? Use slf4j or something?

Reply to this email directly or view it on GitHub:
#13 (comment)

@barend
Copy link

barend commented May 27, 2011

Sticking with Log4J, you could use LogManager.exists("com.xebia...") to see if a logger is configured and run the BasicConfigurator only of there is none.

@barend barend closed this as completed May 27, 2011
@barend barend reopened this May 27, 2011
@barend
Copy link

barend commented May 27, 2011

I'd use whatever Fitnesse uses. Blend into the host environment.

bvklingeren

I would indeed migrate to slf4j

@amolenaar
Copy link
Member

System.out?

Dunno, the driver is not using anything AFAICT.

Just checked and it works nice with slf4j and slf4j-simple.

@amolenaar
Copy link
Member

Committed. Please try.

@bvklingeren
Copy link
Contributor Author

thanks dude, we'll do

2011/5/27 amolenaar
reply@reply.github.com:

Committed. Please try.

Reply to this email directly or view it on GitHub:
#13 (comment)

@amolenaar
Copy link
Member

If this works okay now we can do a release.

@bvklingeren
Copy link
Contributor Author

Unfortunately I can't test it without a lot of hassle, but I take your
word on it that it works. Go and make the release and we'll test it in
real life (we only support release builds)

Cheers,
Boudewijn

2011/5/30 amolenaar
reply@reply.github.com:

If this works okay now we can do a release.

Reply to this email directly or view it on GitHub:
#13 (comment)

@amolenaar
Copy link
Member

I'll close this issue, unless you still face troubles.

@bvklingeren
Copy link
Contributor Author

Sorry for the late reply, but the configuration works correctly. Only one remark: please change the scope of the slf4j-simple.jar to test, because it's an implementation wich should be provided by the user, not Xebium.

Cheers,
Boudewijn

@amolenaar
Copy link
Member

Done that. Check out 0.4 :)

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

No branches or pull requests

3 participants