ooops - forgot to include all of Geotools :)

On Thu, Oct 14, 2021 at 5:32 PM Alessandro Ferrucci <
alessandroferru...@gmail.com> wrote:

> Hello Jody -
>
> Yes, the solution is quite simple.  The following steps assume you're
> using SLF4J with LOG4J2 ( which my project is ).  These are the following
> dependencies you need in your pom file:
>
> <properties>
>         <slf4j.version>2.11.2</slf4j.version>
>     </properties>
> <dependency>
>             <groupId>org.apache.logging.log4j</groupId>
>             <artifactId>log4j-api</artifactId>
>             <version>${slf4j.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.logging.log4j</groupId>
>             <artifactId>log4j-core</artifactId>
>             <version>${slf4j.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.logging.log4j</groupId>
>             <artifactId>log4j-slf4j-impl</artifactId>
>             <version>${slf4j.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>jul-to-slf4j</artifactId>
>             <version>1.7.31</version>
>         </dependency>
>
> Then you need to initialize the bridge handler.  This can be done 1 of 2
> ways:
>
> 1) Programmatically configure it at the start of your program via the
> following 2 lines:
>
>         SLF4JBridgeHandler.removeHandlersForRootLogger();
>        SLF4JBridgeHandler.install();
>
> 2) Configure the bridge handler via logging.properties:
>
> handlers = org.slf4j.bridge.SLF4JBridgeHandler
>
> JUL levels map to SLFJ4 levels as such:
>
>
>  FINEST  -> TRACE
>  FINER   -> DEBUG
>  FINE    -> DEBUG
>  INFO    -> INFO
>  WARNING -> WARN
>  SEVERE  -> ERROR
>
>
> In your SLF4J property file you can then configure your levels for each
> geotools package you're interested in, I did it like this:
>
> <Logger name="org.geotools" level="TRACE" additivity="true"/>
>
>
>
> On Thu, Oct 14, 2021 at 5:20 PM Jody Garnett <jody.garn...@gmail.com>
> wrote:
>
>> Do you have any tips for the user guide? We would welcome a code example
>> for the next person…
>>
>> I still want a newer log4j bridge also…
>>
>> On Thu, Oct 14, 2021 at 1:55 PM Alessandro Ferrucci <
>> alessandroferru...@gmail.com> wrote:
>>
>>> I was able to fix this issue by configuring the jul-to-slf4j bridge ( my
>>> project uses SLF4J ).
>>>
>>> On Thu, Oct 14, 2021 at 4:34 PM Alessandro Ferrucci <
>>> alessandroferru...@gmail.com> wrote:
>>>
>>>> Hello -
>>>>
>>>> I'm attempting to configure JUL to output everything from GeoTools at
>>>> the FINEST level.
>>>>
>>>> I have attempted to change the logging.properties under $JAVA_HOME/conf/
>>>>
>>>> I added this line at the end of that file:
>>>>
>>>> org.geotools.level = FINEST
>>>>
>>>> to no avail.
>>>>
>>>> I also created a new logging.properties with the following lines:
>>>>
>>>> handlers=java.util.logging.ConsoleHandler
>>>> .level=FINEST
>>>>
>>>> and set the following JVM argument
>>>> -Djava.util.logging.config.file=$DIRECTORY\fine-logging.properties
>>>>
>>>> but GeoTools will still not output anything but INFO.
>>>>
>>>> I understand this is not strictly a GeoTools question, but I was
>>>> wondering if anyone on here had any insight.
>>>>
>>>
>>>
>>> --
>>> Signed,
>>> Alessandro Ferrucci
>>> _______________________________________________
>>> GeoTools-GT2-Users mailing list
>>> GeoTools-GT2-Users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>
>> --
>> --
>> Jody Garnett
>>
>
>
> --
> Signed,
> Alessandro Ferrucci
>


-- 
Signed,
Alessandro Ferrucci
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to