This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252709 - Add hint to create a default logger
Summary: Add hint to create a default logger
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
Depends on: 252708
  Show dependency tree
Reported: 2015-05-31 09:48 UTC by cezariusz
Modified: 2015-05-31 09:48 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-05-31 09:48:30 UTC
Product Version: NetBeans IDE Dev (Build 201505290001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb)

Suppose you are writing some code and suddenly when you type "logger." you realize that you don't have a logger defined for the current class. What you have to do is go to the beginning of the class, type "logr" + TAB, and then go back where you were, recall what you were going to write and continue coding.

It could be solved in at least two ways:
1. Add a new action to "Insert Code" - "Logger at the beginning" (or a parameter to the current "Logger" action, or make it always insert the logger at the beginning of the class)
2. Add a hint for an unknown "logger" identifier to create a default logger.

The default name of the logger could be defined somewhere in options or project properties (see bug 252708), and it would be used to detect when the hint from 2. should be offered.