if (maxEntrySize < 0) {
throw new IllegalArgumentException("Max entry size must be greater than or equal to zero");
} else if (maxEntrySize > DEFAULT_MAX_ENTRY_SIZE) {
- LOG.atWarn().log("setting max entry size greater than 4Gb can be risky; set to " + maxEntrySize + " bytes");
+ LOG.warn("setting max entry size greater than 4Gb can be risky; set to {} bytes", maxEntrySize);
}
MAX_ENTRY_SIZE = maxEntrySize;
}
if (maxTextSize < 0) {
throw new IllegalArgumentException("Max text size must be greater than or equal to zero");
}else if (maxTextSize > DEFAULT_MAX_TEXT_SIZE) {
- LOG.atWarn().log("setting max text size greater than " + DEFAULT_MAX_TEXT_SIZE + " can be risky; set to " + maxTextSize + " chars");
+ LOG.warn("setting max text size greater than {} can be risky; set to {} chars", DEFAULT_MAX_TEXT_SIZE, maxTextSize);
}
MAX_TEXT_SIZE = maxTextSize;
}
if (categoryData != null && values != null) {
int numOfPoints = category.getPointCount();
if (numOfPoints != values.getPointCount()) {
- LOGGER.warn("Category and values must have the same point count, but had " +
- numOfPoints + " categories and " + values.getPointCount() + " values.");
+ LOGGER.warn("Category and values must have the same point count, but had {}" +
+ " categories and {} values.", numOfPoints, values.getPointCount());
}
}
this.categoryData = category;
private static final String SHEET_WITH_COMMENTS =
"/xl/worksheets/sheet1.xml";
- private static final Logger LOG = LogManager.getLogger(TestPackageCoreProperties.class);
+ private static final Logger LOG = LogManager.getLogger(TestRelationships.class);
/**
* Test relationships are correctly loaded. This at the moment fails (as of r499)
unused = LittleEndian.getShort(data, offset+14);
if (bytesRemaining + 8 != 16) {
- LOG.warn("Invalid header-data received, should have 8 bytes left, but had: " + bytesRemaining);
+ LOG.warn("Invalid header-data received, should have 8 bytes left, but had: {}", bytesRemaining);
}
return bytesRemaining + 8;
ofs += _header.length;
if (LittleEndian.getShort(_header, 0) != 0) {
- LOG.atDebug().log("Invalid data for SSSlideInfoAtom at offset 0: " + LittleEndian.getShort(_header, 0));
+ LOG.debug("Invalid data for SSSlideInfoAtom at offset 0: {}", LittleEndian.getShort(_header, 0));
}
if (LittleEndian.getShort(_header, 2) != RecordTypes.SSSlideInfoAtom.typeID) {
- LOG.atDebug().log("Invalid data for SSSlideInfoAtom at offset 2: "+ LittleEndian.getShort(_header, 2));
+ LOG.debug("Invalid data for SSSlideInfoAtom at offset 2: {}", LittleEndian.getShort(_header, 2));
}
if (LittleEndian.getShort(_header, 4) != 0x10) {
- LOG.atDebug().log("Invalid data for SSSlideInfoAtom at offset 4: "+ LittleEndian.getShort(_header, 4));
+ LOG.debug("Invalid data for SSSlideInfoAtom at offset 4: {}", LittleEndian.getShort(_header, 4));
}
if (LittleEndian.getShort(_header, 6) == 0) {
- LOG.atDebug().log("Invalid data for SSSlideInfoAtom at offset 6: "+ LittleEndian.getShort(_header, 6));
+ LOG.debug("Invalid data for SSSlideInfoAtom at offset 6: {}", LittleEndian.getShort(_header, 6));
}
_slideTime = LittleEndian.getInt(source, ofs);
if (_slideTime < 0 || _slideTime > 86399000) {
- LOG.atDebug().log("Invalid data for SSSlideInfoAtom - invalid slideTime: "+ _slideTime);
+ LOG.debug("Invalid data for SSSlideInfoAtom - invalid slideTime: {}", _slideTime);
}
ofs += LittleEndianConsts.INT_SIZE;
_soundIdRef = LittleEndian.getInt(source, ofs);
int pos = offset;
pos += drawingGroupData.fillFields(data, pos, recordFactory);
if (drawingGroupData.getRecordId() == EscherRecordTypes.DGG_CONTAINER.typeID) {
- LOG.atDebug().log("Invalid record-id for filling Escher records: " + drawingGroupData.getRecordId());
+ LOG.debug("Invalid record-id for filling Escher records: {}", drawingGroupData.getRecordId());
}
/*
@Deprecated
private void createPap(int istd, int nesting) {
if (nesting > MAX_PAPX_NESTING) {
- LOG.warn("Encountered too deep nesting, cannot fully process stylesheet at " + istd +
- " with more than " + MAX_PAPX_NESTING + " nested ParagraphProperties." +
- " Some data could not be parsed.");
+ LOG.warn("Encountered too deep nesting, cannot fully process stylesheet at {}" +
+ " with more than {} nested ParagraphProperties." +
+ " Some data could not be parsed.", istd, MAX_PAPX_NESTING);
return;
}
@Deprecated
private void createChp(int istd, int nesting) {
if (nesting > MAX_CHPX_NESTING) {
- LOG.warn("Encountered too deep nesting, cannot fully process stylesheet at " + istd +
- " with more than " + MAX_CHPX_NESTING + " nested CharacterProperties." +
- " Some data could not be parsed.");
+ LOG.warn("Encountered too deep nesting, cannot fully process stylesheet at {}" +
+ " with more than {} nested CharacterProperties." +
+ " Some data could not be parsed.", istd, MAX_CHPX_NESTING);
return;
}
import org.junit.jupiter.params.provider.MethodSource;
public class TestWordToTextConverter {
- private static final Logger LOG = LogManager.getLogger(WordToTextConverter.class);
+ private static final Logger LOG = LogManager.getLogger(TestWordToTextConverter.class);
private static final List<String> failingFiles = Arrays.asList(
// Excel file
@ParameterizedTest
@MethodSource("files")
void testAllFiles(File file) throws Exception {
- LOG.info("Testing " + file);
+ LOG.info("Testing {}", file);
try (FileInputStream stream = new FileInputStream(file)) {
InputStream is = FileMagic.prepareToCheckMagic(stream);
FileMagic fm = FileMagic.valueOf(is);
if (fm != FileMagic.OLE2) {
- LOG.info("Skip non-doc file " + file);
+ LOG.info("Skip non-doc file {}", file);
return;
}
parts.add(new CellFormatPart(locale, valueDesc));
} catch (RuntimeException e) {
- LOG.log(Level.WARN, "Invalid format: " + CellFormatter.quote(m.group()), e);
+ LOG.warn("Invalid format: {}", CellFormatter.quote(m.group()), e);
parts.add(null);
}
}
return null;
Color c = NAMED_COLORS.get(cdesc);
if (c == null) {
- LOG.warn("Unknown color: " + quote(cdesc));
+ LOG.warn("Unknown color: {}", quote(cdesc));
}
return c;
}