Vendor: Juergen Kellerer
Source code: LogSupport_4953.zip
This plugin supports creating and managing log calls.
Once installed the plugin makes using log frameworks as painless as printing to stdout.
This is achieved with the addition of intentions, live templates and
code inspections that support the most important aspects of the configured log framework.
Whenever you'd attempt to write to stdout using
"sout + TAB" you can now use "logd + TAB" to write a
debug log line instead (other log levels are accessible via similarly named live templates).
The plugin is aware of loggers that are currently reachable from the context and can also
add new loggers if none are reachable. Creating log output remains the same no matter what
log framework is used as all operations inside the bundled live templates are performed using
the framework that was previously defined for the current project scope.
Log calls are validated and optionally wrapped in conditional expressions if this is desired.
On top of the basic feature set, enterprise class features like log ID and
log review generation are available to help improving the overall
quality of the generated log.
- Supports possibly any log framework and facade
Pre-configured and tested with: log4j12, slf4j,
java.util.logging and commons log
- Assists in the generation of log IDs
Generates editable XHTML or ODS (Open Document Spreadsheet) review
documents containing a collection of log messages that can be reviewed and adjusted
by a non-developer (e.g. technical writer).
Adds 5 live templates logt, logd, logi,
logw and loge that offer a framework neutral way
of using log calls in the day to day business.
Adds 5 intentions and context actions that allow:
- Wrapping and unwrapping log calls in 'if' conditions.
- Add, update, replace or remove log IDs.
Adds 3 code inspections that verify whether:
Log calls are wrapped in 'if' conditions
(depending on the project setup)
Formatted messages are valid when using MessageFormat or
printf enabled frameworks.
Throwables can be combined with formatted messages (e.g. logback does not support this)
Full usage instructions can be found at the plugin's homepage.
Recent change notes
- Fixed compatibility issues with IDEA >= 11.0
- Refactored the plugin to have 2 build targets: One for IDEA prior to 11 and one for 11 and later.
(thanks to B.K. for opening the thread #5304686)
- Fixed 3401836: Deadlock when generating log reviews and no matching log messages were found.
- Improvement: Added support for static log methods.
- Improvement: Added configurations for Android 'Log' and slf4j 'XLogger'.
- Fixed 3396819: The cursor is not positioned correctly with braced conditions.
- Improvement: Showing a notification when no default log framework is set but required.
- Improvement 3305941: Shorten source names in log review.
- Improvement 3398563: Log reviews should maintain the order of logs as they appear.
- Fixed 3308797: Log calls are not always detected correctly.
- Improvement: Throwables are optionally added when using any of the live templates and
exceptions are in the scope (this used to be hardcoded in loge).
- Fixed 3308351: Logging fails in IDEA 10.5 if multiple loggers exist.
- Fixed 3308322: Cannot enable the option "Do not use configured instances..".
- Added initial support for JBoss logging.
- Fixed 3306029: UI blocks if creating a log review and the rev. file exists.
- Added 3305936: Support if condition that was stored in a variable.
- Fixed 3305978: Logger is not detected if the instance is a subclass.
- Fixed 3305945: Fails when surrounding class is interface.
- Fixed 3305942: No 'if' wrapping for newly added logger.
- Added experimental support for log reviews in Open Document Spreadsheet (*.ods) format.
- Fixed code corruption bug in the recursive addition and removal of 'if' conditions.
- Fixed a couple of compatibility issues with IDEA >= 10.0.2
- Fixed bugs in the action "Integrate Log Review".
- Added shortening of FQ names when logger field is added.
- Fixed several minor bugs.
- Runs on IntelliJ IDEA 8 and 9 now.
- Released sources on SF.net.
- Initial Release for IDEA >= 8.
General usage instructions
Check the features list. Once configured most features are available via live templates and intentions.