user2763361
user2763361

Reputation: 3919

Where to find log4j.properties file

In many anwers on this site related to log4j facilities, the answer says "edit your log4j.properties file".

Where can I find this file on disk in Ubuntu?

Upvotes: 0

Views: 1753

Answers (2)

David Billings
David Billings

Reputation: 376

In addition to Sean's answer you can also put the log4j file somewhere else and let log4j know where it is by passing -Dlog4j.configuration= in the VM args.

Upvotes: 1

Sean Patrick Floyd
Sean Patrick Floyd

Reputation: 298818

You can't find it unless you've created it.

In a Java Project, it usually goes in a resources folder, e.g. src/main/resources in a maven-based setup. Create a log4j.properties or log4j.xml and it will automatically be picked up by all loggers from classes in that project.

Upvotes: 1

Related Questions