* Creates the view and logs a record.
*/
private static GridCoverage2D createView(final GridCoverage2D coverage, final RenderedOp view,
final GridSampleDimension[] targetBands, final int code, final Hints userHints)
{
final InternationalString name = coverage.getName();
if (GridCoverage2D.LOGGER.isLoggable(CoverageProcessor.OPERATION)) {
// Logs a message using the same level than grid coverage processor.
final String operation = view.getOperationName();
final String shortName = operation.substring(operation.lastIndexOf('.') + 1);
final Locale locale = coverage.getLocale();
final LogRecord record = Loggings.getResources(locale).getLogRecord(
CoverageProcessor.OPERATION, LoggingKeys.SAMPLE_TRANSCODE_$3, new Object[] {
(name != null) ? name.toString(locale) :
Vocabulary.getResources(locale).getString(VocabularyKeys.UNTITLED),
Integer.valueOf(code), shortName
});
record.setSourceClassName(GridCoverage2D.class.getName());
record.setSourceMethodName("geophysics");