replace with string format on logger
This commit is contained in:
parent
e9a376b473
commit
610b144730
26 changed files with 54 additions and 54 deletions
|
@ -89,7 +89,7 @@ public class AllJobScheduler implements LaJobScheduler {
|
|||
try {
|
||||
jobHelper.register(scheduledJob);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to update schdule " + scheduledJob, e);
|
||||
logger.warn("Failed to update schdule {}", scheduledJob, e);
|
||||
}
|
||||
});
|
||||
schedulerTime = now;
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ScriptExecutorJob implements LaJob {
|
|||
|
||||
protected void process(final LaJobRuntime runtime) {
|
||||
if (!runtime.getParameterMap().containsKey(Constants.SCHEDULED_JOB)) {
|
||||
logger.warn(Constants.SCHEDULED_JOB + " is empty.");
|
||||
logger.warn("{} is empty.", Constants.SCHEDULED_JOB);
|
||||
return;
|
||||
}
|
||||
runtime.stopIfNeeds();
|
||||
|
@ -111,7 +111,7 @@ public class ScriptExecutorJob implements LaJob {
|
|||
}
|
||||
jobLog.setJobStatus(Constants.OK);
|
||||
} catch (final Throwable t) {
|
||||
logger.warn("Failed to execute " + id + ": " + script, t);
|
||||
logger.warn("Failed to execute {}: {}", id, script, t);
|
||||
jobLog.setJobStatus(Constants.FAIL);
|
||||
jobLog.setScriptResult(systemHelper.abbreviateLongText(t.getLocalizedMessage()));
|
||||
} finally {
|
||||
|
|
|
@ -137,7 +137,7 @@ public class BadWordService {
|
|||
badWordBhv.update(badWord);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to read a sugget elevate word: " + list, e);
|
||||
logger.warn("Failed to read a sugget elevate word: {}", list, e);
|
||||
}
|
||||
}
|
||||
fessEsClient.refresh("_all"); // TODO replace _all
|
||||
|
@ -165,7 +165,7 @@ public class BadWordService {
|
|||
try {
|
||||
csvWriter.writeValues(list);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to write a sugget bad word: " + entity, e);
|
||||
logger.warn("Failed to write a sugget bad word: {}", entity, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ public class CrawlingInfoService {
|
|||
entity.setCreatedTime(formatter.parse(list.get(4)).getTime());
|
||||
crawlingInfoParamBhv.insert(entity, op -> op.setRefreshPolicy(Constants.TRUE));
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to read a click log: " + list, e);
|
||||
logger.warn("Failed to read a click log: {}", list, e);
|
||||
}
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
|
@ -278,7 +278,7 @@ public class CrawlingInfoService {
|
|||
try {
|
||||
csvWriter.writeValues(list);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to write a crawling session info: " + entity, e);
|
||||
logger.warn("Failed to write a crawling session info: {}", entity, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ public class ElevateWordService {
|
|||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to read a sugget elevate word: " + list, e);
|
||||
logger.warn("Failed to read a sugget elevate word: {}", list, e);
|
||||
}
|
||||
}
|
||||
elevateWordBhv.refresh();
|
||||
|
@ -309,7 +309,7 @@ public class ElevateWordService {
|
|||
try {
|
||||
csvWriter.writeValues(list);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to write a sugget elevate word: " + entity, e);
|
||||
logger.warn("Failed to write a sugget elevate word: {}", entity, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ public class ScheduledJobService {
|
|||
try {
|
||||
ComponentUtil.getJobHelper().register(cron, scheduledJob);
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to start Job " + scheduledJob.getId(), e);
|
||||
logger.error("Failed to start Job {}", scheduledJob.getId(), e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
}
|
||||
systemHelper.reloadConfiguration();
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to process bulk file: " + fileName, e);
|
||||
logger.warn("Failed to process bulk file: {}", fileName, e);
|
||||
} finally {
|
||||
deleteTempFile(tempFile);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
try (final InputStream in = new FileInputStream(tempFile)) {
|
||||
configParser.parse(new InputSource(in));
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to process gsa.xml file: " + fileName, e);
|
||||
logger.warn("Failed to process gsa.xml file: {}", fileName, e);
|
||||
} finally {
|
||||
deleteTempFile(tempFile);
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
try (final InputStream in = new FileInputStream(tempFile)) {
|
||||
ComponentUtil.getSystemProperties().load(in);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to process system.properties file: " + fileName, e);
|
||||
logger.warn("Failed to process system.properties file: {}", fileName, e);
|
||||
} finally {
|
||||
deleteTempFile(tempFile);
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
try (final InputStream in = new FileInputStream(tempFile); final OutputStream out = Files.newOutputStream(getFessJsonPath())) {
|
||||
CopyUtil.copy(in, out);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to process fess.json file: " + fileName, e);
|
||||
logger.warn("Failed to process fess.json file: {}", fileName, e);
|
||||
} finally {
|
||||
deleteTempFile(tempFile);
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
try (final InputStream in = new FileInputStream(tempFile); final OutputStream out = Files.newOutputStream(getDocJsonPath())) {
|
||||
CopyUtil.copy(in, out);
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to process doc.json file: " + fileName, e);
|
||||
logger.warn("Failed to process doc.json file: {}", fileName, e);
|
||||
} finally {
|
||||
deleteTempFile(tempFile);
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ public class AdminBackupAction extends FessAdminAction {
|
|||
writeCall.accept(writer);
|
||||
writer.flush();
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to write " + id + " to response.", e);
|
||||
logger.warn("Failed to write {} to response.", id, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
groupService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to add " + entity, e);
|
||||
logger.error("Failed to add {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
groupService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to update " + entity, e);
|
||||
logger.error("Failed to update {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToUpdateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
groupService.delete(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to delete " + entity, e);
|
||||
logger.error("Failed to delete {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToDeleteCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asDetailsHtml);
|
||||
}
|
||||
|
|
|
@ -120,8 +120,8 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|||
fessEsClient.admin().indices().prepareClose(docIndex).execute(ActionListener.wrap(res -> {
|
||||
logger.info("Close {}", docIndex);
|
||||
fessEsClient.admin().indices().prepareOpen(docIndex).execute(
|
||||
ActionListener.wrap(res2 -> logger.info("Open {}", docIndex), e -> logger.warn("Failed to open " + docIndex, e)));
|
||||
}, e -> logger.warn("Failed to close " + docIndex, e)));
|
||||
ActionListener.wrap(res2 -> logger.info("Open {}", docIndex), e -> logger.warn("Failed to open {}", docIndex, e)));
|
||||
}, e -> logger.warn("Failed to close {}", docIndex, e)));
|
||||
saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
|
||||
return redirect(getClass());
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|||
CopyUtil.copy(response.getContentAsStream(), zos);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to access /_" + v1 + "/" + v2, e);
|
||||
logger.warn("Failed to access /_{}/{}", v1, v2, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|||
CopyUtil.copy(response.getContentAsStream(), zos);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to access /_cat/" + name, e);
|
||||
logger.warn("Failed to access /_cat/{}", name, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|||
logger.debug("{}: {}", filePath.getFileName(), len);
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Failed to access " + filePath, e);
|
||||
logger.warn("Failed to access {}", filePath, e);
|
||||
}
|
||||
});
|
||||
} catch (final Exception e) {
|
||||
|
@ -297,7 +297,7 @@ public class AdminMaintenanceAction extends FessAdminAction {
|
|||
if (replaceAliases && !fessEsClient.updateAlias(toIndex)) {
|
||||
logger.warn("Failed to update aliases for {} and {}", fromIndex, toIndex);
|
||||
}
|
||||
}, e -> logger.warn("Failed to reindex from " + fromIndex + " to " + toIndex, e)));
|
||||
}, e -> logger.warn("Failed to reindex from {} to {}", fromIndex, toIndex, e)));
|
||||
return true;
|
||||
}
|
||||
saveError(messages -> messages.addErrorsFailedToReindex(GLOBAL, fromIndex, toIndex));
|
||||
|
|
|
@ -108,7 +108,7 @@ public class AdminPluginAction extends FessAdminAction {
|
|||
pluginHelper.getArtifactFromFileName(ArtifactType.UNKNOWN, filename, tempFile.getAbsolutePath());
|
||||
pluginHelper.installArtifact(artifact);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to install " + filename, e);
|
||||
logger.warn("Failed to install {}", filename, e);
|
||||
} finally {
|
||||
if (tempFile.exists() && !tempFile.delete()) {
|
||||
logger.warn("Failed to delete {}.", tempFile.getAbsolutePath());
|
||||
|
@ -190,14 +190,14 @@ public class AdminPluginAction extends FessAdminAction {
|
|||
try {
|
||||
pluginHelper.installArtifact(artifact);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to install " + artifact.getFileName(), e);
|
||||
logger.warn("Failed to install {}", artifact.getFileName(), e);
|
||||
}
|
||||
for (final Artifact a : artifacts) {
|
||||
if (a.getName().equals(artifact.getName()) && !a.getVersion().equals(artifact.getVersion())) {
|
||||
try {
|
||||
pluginHelper.deleteInstalledArtifact(a);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to delete " + a.getFileName(), e);
|
||||
logger.warn("Failed to delete {}", a.getFileName(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public class AdminPluginAction extends FessAdminAction {
|
|||
try {
|
||||
ComponentUtil.getPluginHelper().deleteInstalledArtifact(artifact);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to delete " + artifact.getFileName(), e);
|
||||
logger.warn("Failed to delete {}", artifact.getFileName(), e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
roleService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to add " + entity, e);
|
||||
logger.error("Failed to add {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
roleService.delete(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to delete " + entity, e);
|
||||
logger.error("Failed to delete {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), this::asDetailsHtml);
|
||||
}
|
||||
}).orElse(() -> {
|
||||
|
|
|
@ -283,7 +283,7 @@ public class AdminSearchlistAction extends FessAdminAction {
|
|||
fessEsClient.store(index, entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to add " + entity, e);
|
||||
logger.error("Failed to add {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ public class AdminSearchlistAction extends FessAdminAction {
|
|||
fessEsClient.store(index, entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to update " + entity, e);
|
||||
logger.error("Failed to update {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToUpdateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
userService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to add " + entity, e);
|
||||
logger.error("Failed to add {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
userService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to update " + entity, e);
|
||||
logger.error("Failed to update {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToUpdateCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asEditHtml);
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
userService.delete(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to delete " + entity, e);
|
||||
logger.error("Failed to delete {}", entity, e);
|
||||
throwValidationError(messages -> messages.addErrorsCrudFailedToDeleteCrudTable(GLOBAL, buildThrowableMessage(e)),
|
||||
this::asDetailsHtml);
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ public class AdminWizardAction extends FessAdminAction {
|
|||
}
|
||||
return configName;
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to create crawling config: " + form.crawlingConfigPath, e);
|
||||
logger.error("Failed to create crawling config: {}", form.crawlingConfigPath, e);
|
||||
throwValidationError(messages -> messages.addErrorsFailedToCreateCrawlingConfigAtWizard(GLOBAL),
|
||||
() -> asHtml(path_AdminWizard_AdminWizardConfigJsp));
|
||||
return null;
|
||||
|
|
|
@ -133,7 +133,7 @@ public class ApiAdminSearchlistAction extends FessApiAdminAction {
|
|||
fessEsClient.store(index, entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to add " + entity, e);
|
||||
logger.error("Failed to add {}", entity, e);
|
||||
throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL, buildThrowableMessage(e)));
|
||||
}
|
||||
return entity;
|
||||
|
@ -174,7 +174,7 @@ public class ApiAdminSearchlistAction extends FessApiAdminAction {
|
|||
fessEsClient.store(index, entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to update " + entity, e);
|
||||
logger.error("Failed to update {}", entity, e);
|
||||
throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToUpdateCrudTable(GLOBAL, buildThrowableMessage(e)));
|
||||
}
|
||||
return entity;
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CacheAction extends FessSearchAction {
|
|||
try {
|
||||
doc = searchHelper.getDocumentByDocId(form.docId, queryHelper.getCacheResponseFields(), getUserBean()).orElse(null);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to request: " + form.docId, e);
|
||||
logger.warn("Failed to request: {}", form.docId, e);
|
||||
}
|
||||
if (doc == null) {
|
||||
saveError(messages -> messages.addErrorsDocidNotFound(GLOBAL, form.docId));
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GoAction extends FessSearchAction {
|
|||
doc = searchHelper.getDocumentByDocId(form.docId,
|
||||
new String[] { fessConfig.getIndexFieldUrl(), fessConfig.getIndexFieldConfigId() }, getUserBean()).orElse(null);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to request: " + form.docId, e);
|
||||
logger.warn("Failed to request: {}", form.docId, e);
|
||||
}
|
||||
if (doc == null) {
|
||||
saveError(messages -> messages.addErrorsDocidNotFound(GLOBAL, form.docId));
|
||||
|
@ -139,7 +139,7 @@ public class GoAction extends FessSearchAction {
|
|||
}
|
||||
return response;
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to load: " + doc, e);
|
||||
logger.warn("Failed to load: {}", doc, e);
|
||||
saveError(messages -> messages.addErrorsNotLoadFromServer(GLOBAL, targetUrl));
|
||||
return redirect(ErrorAction.class);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public class LoginAction extends FessLoginAction {
|
|||
userService.changePassword(username, form.password);
|
||||
saveInfo(messages -> messages.addSuccessChangedPassword(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to change newPassword for " + username, e);
|
||||
logger.warn("Failed to change newPassword for {}", username, e);
|
||||
throwValidationError(messages -> messages.addErrorsFailedToChangePassword(GLOBAL), toIndexPage);
|
||||
}
|
||||
getSession().ifPresent(session -> session.removeAttribute(INVALID_OLD_PASSWORD));
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ProfileAction extends FessSearchAction {
|
|||
userService.changePassword(username, form.newPassword);
|
||||
saveInfo(messages -> messages.addSuccessChangedPassword(GLOBAL));
|
||||
} catch (final Exception e) {
|
||||
logger.error("Failed to change password for " + username, e);
|
||||
logger.error("Failed to change password for {}", username, e);
|
||||
throwValidationError(messages -> messages.addErrorsFailedToChangePassword(GLOBAL), toIndexPage);
|
||||
}
|
||||
return redirect(getClass());
|
||||
|
|
|
@ -156,7 +156,7 @@ public abstract class AbstractFessFileTransformer extends AbstractTransformer im
|
|||
logger.warn("Unknown mapping type: {}={}", key, mapping);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to parse " + values[0], e);
|
||||
logger.warn("Failed to parse {}", values[0], e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ScheduledJobBhv extends BsScheduledJobBhv {
|
|||
ThreadUtil.sleep(RandomUtils.nextLong(500, 5000));
|
||||
}
|
||||
}
|
||||
logger.warn("Failed to select a job by " + id, lastException);
|
||||
logger.warn("Failed to select a job by {}", id, lastException);
|
||||
return OptionalEntity.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ public class DataConfig extends BsDataConfig implements CrawlingConfig {
|
|||
try {
|
||||
smbAuth.setPort(Integer.parseInt(port));
|
||||
} catch (final NumberFormatException e) {
|
||||
logger.warn("Failed to parse " + port, e);
|
||||
logger.warn("Failed to parse {}", port, e);
|
||||
}
|
||||
}
|
||||
smbAuth.setUsername(username);
|
||||
|
@ -250,7 +250,7 @@ public class DataConfig extends BsDataConfig implements CrawlingConfig {
|
|||
try {
|
||||
smb1Auth.setPort(Integer.parseInt(port));
|
||||
} catch (final NumberFormatException e) {
|
||||
logger.warn("Failed to parse " + port, e);
|
||||
logger.warn("Failed to parse {}", port, e);
|
||||
}
|
||||
}
|
||||
smb1Auth.setUsername(username);
|
||||
|
@ -273,7 +273,7 @@ public class DataConfig extends BsDataConfig implements CrawlingConfig {
|
|||
try {
|
||||
ftpAuth.setPort(Integer.parseInt(port));
|
||||
} catch (final NumberFormatException e) {
|
||||
logger.warn("Failed to parse " + port, e);
|
||||
logger.warn("Failed to parse {}", port, e);
|
||||
}
|
||||
}
|
||||
ftpAuth.setUsername(username);
|
||||
|
@ -349,7 +349,7 @@ public class DataConfig extends BsDataConfig implements CrawlingConfig {
|
|||
try {
|
||||
p = Integer.parseInt(port);
|
||||
} catch (final NumberFormatException e) {
|
||||
logger.warn("Failed to parse " + port, e);
|
||||
logger.warn("Failed to parse {}", port, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class FileAuthentication extends BsFileAuthentication {
|
|||
try {
|
||||
fileConfig = fileConfigService.getFileConfig(getFileConfigId()).get();
|
||||
} catch (final Exception e) {
|
||||
logger.warn("File Config " + getFileConfigId() + " does not exist.", e);
|
||||
logger.warn("File Config {} does not exist.", getFileConfigId(), e);
|
||||
}
|
||||
}
|
||||
return fileConfig;
|
||||
|
|
|
@ -69,7 +69,7 @@ public class PathMapping extends BsPathMapping {
|
|||
try {
|
||||
return pathMapper.apply(input, matcher);
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Failed to apply " + pathMapper, e);
|
||||
logger.warn("Failed to apply {}", pathMapper, e);
|
||||
}
|
||||
}
|
||||
return input;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class RequestHeader extends BsRequestHeader {
|
|||
try {
|
||||
webConfig = webConfigService.getWebConfig(getWebConfigId()).get();
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Web Config " + getWebConfigId() + " does not exist.", e);
|
||||
logger.warn("Web Config {} does not exist.", getWebConfigId(), e);
|
||||
}
|
||||
}
|
||||
return webConfig;
|
||||
|
|
|
@ -124,7 +124,7 @@ public class WebAuthentication extends BsWebAuthentication {
|
|||
try {
|
||||
webConfig = webConfigService.getWebConfig(getWebConfigId()).get();
|
||||
} catch (final Exception e) {
|
||||
logger.warn("Web Config " + getWebConfigId() + " does not exist.", e);
|
||||
logger.warn("Web Config {} does not exist.", getWebConfigId(), e);
|
||||
}
|
||||
}
|
||||
return webConfig;
|
||||
|
|
Loading…
Add table
Reference in a new issue