alessiodf opened a new issue, #1554:
URL: https://github.com/apache/incubator-fury/issues/1554

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-fury/issues) and found no similar 
issues.
   
   
   ### Version
   
   Version: 0.5.0 (built from source)
   OS: macOS
   JDK: 22
   
   After following the [GraalVM 
guide](https://github.com/apache/incubator-fury/blob/main/docs/guide/graalvm_guide.md)
 by using a static class field for `native-image` compilation, I was able to 
disable logging with `LoggerFactory.disableLogging()` if a using a `Fury`. 
However, logging is not disabled if a `ThreadSafeFury` is used instead.
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   ```
   import org.apache.fury.Fury;
   import org.apache.fury.ThreadSafeFury;
   import org.apache.fury.logging.LoggerFactory;
   public class Main {
       static ThreadSafeFury fury;
       static {
           LoggerFactory.disableLogging();
           fury = new ThreadLocalFury(classLoader -> {
               return Fury.builder().build();
           });
           // Also tried: fury = Fury.builder().buildThreadSafeFury();
       }
       public static void main(String[] args) {
           fury.serialize(Main.class);
       }
   }
   ```
   
   ### What did you expect to see?
   
   No output
   
   ### What did you see instead?
   
   `2024-04-21 05:33:31 INFO  Fury:144 [main] - Created new fury 
org.apache.fury.Fury@50c4ee77`
   
   ### Anything Else?
   
   Correct behaviour is observed in the JVM with a `ThreadSafeFury`, i.e. when 
not compiled with `native-image`. Similarly, correct behaviour is observed in 
both the JVM and `native-image` when using a `Fury` instead of a 
`ThreadSafeFury`.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to