You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "wumpz (via GitHub)" <gi...@apache.org> on 2025/06/11 07:03:50 UTC

[I] now Netbeans creates System.Logger [netbeans]

wumpz opened a new issue, #8574:
URL: https://github.com/apache/netbeans/issues/8574

   ### Apache NetBeans version
   
   Apache NetBeans 26
   
   ### What happened
   
   Since version 26 if I want to include a logger into my classfile Netbeans creates something like
   
   ```
   private static final System.Logger LOG = System.getLogger(MyClass.class.getName());
   ```
   
   in previous versions this was 
   
   ```
   import java.util.logging.Logger;
   ...
   private static final Logger LOG = Logger.getLogger(MyClass.class.getName());
   ```
   
   Is there any reason to change it? Is there a way to get back the old behavior?
   
   However, it is quite annoying since we use the standard java.util.logging implementation and System.Logger only gives limited access to it.
   
   
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   add Logger to class
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 25
   
   ### Operating System
   
   Windows 11
   
   ### JDK
   
   24 maven runs on 17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
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: notifications-unsubscribe@netbeans.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] now Netbeans creates System.Logger [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #8574:
URL: https://github.com/apache/netbeans/issues/8574#issuecomment-2961769410

   This isn't a bug.  It was deliberately changed to prefer System.Logger by default in #8253 and following discussion at #8240  It's a better default because it's in `java.base`.
   
   You can change the defaults in the options using `Editor / Hints` and looking up `Surround with try-catch` under `Java / Error Fixes`.
   
   I do think this is a little hard to find in the current UI.  Not sure if there's a better way we might display this information, or provide a hint on generation?


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] now Netbeans creates System.Logger [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net closed issue #8574: now Netbeans creates System.Logger
URL: https://github.com/apache/netbeans/issues/8574


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] now Netbeans creates System.Logger [netbeans]

Posted by "wumpz (via GitHub)" <gi...@apache.org>.
wumpz commented on issue #8574:
URL: https://github.com/apache/netbeans/issues/8574#issuecomment-3154179428

   Very hard to find. 


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists