Another possible solution could be to activate your custom logging.properties 
would be to use a profile

Given the following layout:
pom.xml
src/main/resources/logging.properties

Now normally the maven-resources-plugin will copy this file to 
target/classes/logging.properties during build and test runs and you may load 
it from the class-path (I did not check whether java.util.logging.config.file 
may do a class path lookup, though)

Add a profile to your pom.xml like this:
<profile>
    <id>local-logging.properties</id>
    <activation>
        <file>
            <exists>${user.dir}/debug-resources/logging.properties</exists>
        </file>
    </activation>
    <build>
        <resources>
            <resource>
                <directory>${user.dir}/debug-resources/</directory>
            </resource>
        </resources>
    </build>
</profile>

Create your modified logging.properties at 
`./debug-resources/logging.properties`, add `debug-resources/` to .gitignore

Then this should override the one from src/main/resources (not tested!)

Regards
Mirko

> Am 05.09.2018 um 20:08 schrieb Robert Scholte <rfscho...@apache.org>:
> 
> bq. I have the logging.properties file the app uses at a particular place.
> 
> So it seems specify the location of this file somewhere, probably with the 
> java.util.logging.config.file property.
> How about changing the value of this property?
> 
> Robert
> 
> On Tue, 04 Sep 2018 16:15:00 +0200, Matthew Cline <m...@nightrealms.com> 
> wrote:
> 
>> I'm currently migrating from Ant to Maven, and am wondering how to
>> translate the following:
>> 
>> My project uses java.util.logging.  I have the logging.properties file
>> the app uses at a particular place.  To see what's going on I'll often
>> lower the level of a certain class or package in order to get more
>> logging output, then change it again once I'm done.  Since I'm
>> frequently changing it, this file isn't tracked by git.  However, I do
>> have a default version of logging.properties tracked by git.  If the
>> logging.properties which the app is pointed at is missing, then ant
>> copies the default version there.
>> 
>> However, I get the feeling that this isn't the way to do things with
>> Maven.  So what is the Maven way?
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to