config/.vim/eclim/doc/vim/java/logging.txt

64 lines
1.9 KiB
Plaintext

*vim-java-logging*
Logging
*******
While editing a java source file, if you start to create a logging
statement (log. or logger.), the logging plugin will attempt to
perform the appropriate initialization (imports, static variable) for
the configured logging implementation.
Eclim provides a handful of templates for the most widely used
implementations (commons-logging, slf4j, log4j, and jdk). However, if
you happen to use an alternate logging framework, or perhaps a home
grown framework, eclim also provides the means to supply a custom
template. To utilize it, simply set the org.eclim.java.logging.impl
setting to "custom" and add your template to
~/.eclim/resources/jdt/templates/logger.gst. Two variables will be
supplied to your template: var, which is the logger instance variable,
and class, which is the class name of the current class you are
implementing.
Here is an example which eclim uses for its logger implementation:
>
import org.eclim.logging.Logger;
private static final Logger ${var} = Logger.getLogger(${class}.class);
<
After performing the necessary variable substitution, eclim will take
any imports and insert them amongst your existing import statements.
The remaining code will be inserted after your class definition.
Configuration
=============
Vim Variables
*g:EclimLoggingDisabled*
- g:EclimLoggingDisabled (Default: 0) - If set to a value greater than
0, then this plugin will be disabled.
Eclim Settings
*org.eclim.java.logging.impl*
- org.eclim.java.logging.impl (Default: "commons-logging") -
Determines which logging implementation to use.
Possible values include "commons-logging", "slf4j", "log4j", "jdk",
and "custom".
*org.eclim.java.logging.template*
- org.eclim.java.logging.template (Default: 'logger.gst') - Determines
the name of the template to use for the custom logger. The name
must be a file name relative to ~/.eclim/resources/jdt/templates/.
vim:ft=eclimhelp