turned down some loggly messages, added utility method to value utils

This commit is contained in:
Tim Chamberlain
2025-03-25 10:08:54 -05:00
parent 491fcd6d25
commit 513c8f2efb
6 changed files with 47 additions and 19 deletions

View File

@ -83,7 +83,7 @@ public class RunRecordScriptAutomationHandler extends RecordAutomationHandler
}
QRecord scriptRevision = queryOutput.getRecords().get(0);
LOG.info("Running script against records", logPair("scriptRevisionId", scriptRevision.getValue("id")), logPair("scriptId", scriptRevision.getValue("scriptIdd")));
LOG.debug("Running script against records", logPair("scriptRevisionId", scriptRevision.getValue("id")), logPair("scriptId", scriptRevision.getValue("scriptIdd")));
RunAdHocRecordScriptInput input = new RunAdHocRecordScriptInput();
input.setCodeReference(new AdHocScriptCodeReference().withScriptRevisionRecord(scriptRevision));

View File

@ -356,12 +356,12 @@ public abstract class AbstractTableSyncTransformStep extends AbstractTransformSt
{
if(existingRecord != null)
{
LOG.info("Skipping storing existing record because this sync process is set to not perform updates");
LOG.debug("Skipping storing existing record because this sync process is set to not perform updates");
willNotInsert.incrementCountAndAddPrimaryKey(sourcePrimaryKey);
}
else
{
LOG.info("Skipping storing new record because this sync process is set to not perform inserts");
LOG.debug("Skipping storing new record because this sync process is set to not perform inserts");
willNotUpdate.incrementCountAndAddPrimaryKey(sourcePrimaryKey);
}
continue;

View File

@ -475,4 +475,31 @@ public class StringUtils
return (s);
}
/***************************************************************************
**
***************************************************************************/
public static String appendIncrementingSuffix(String input)
{
////////////////////////////////
// remove any existing suffix //
////////////////////////////////
String base = input.replaceAll(" \\(\\d+\\)$", "");
if(input.matches(".* \\(\\d+\\)$"))
{
//////////////////////////
// increment if matches //
//////////////////////////
int current = Integer.parseInt(input.replaceAll(".* \\((\\d+)\\)$", "$1"));
return base + " (" + (current + 1) + ")";
}
else
{
////////////////////////////////////
// no match so put a 1 at the end //
////////////////////////////////////
return base + " (1)";
}
}
}

View File

@ -56,6 +56,7 @@ public class ValueUtils
private static final DateTimeFormatter dateTimeFormatter_yyyyMMddWithDashes = DateTimeFormatter.ofPattern("yyyy-MM-dd");
private static final DateTimeFormatter dateTimeFormatter_MdyyyyWithSlashes = DateTimeFormatter.ofPattern("M/d/yyyy");
private static final DateTimeFormatter dateTimeFormatter_MdyyWithSlashes = DateTimeFormatter.ofPattern("M/d/yyyy");
private static final DateTimeFormatter dateTimeFormatter_yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd");
@ -450,7 +451,7 @@ public class ValueUtils
private static LocalDate tryLocalDateParsers(String s)
{
DateTimeParseException lastException = null;
for(DateTimeFormatter dateTimeFormatter : List.of(dateTimeFormatter_yyyyMMddWithDashes, dateTimeFormatter_MdyyyyWithSlashes, dateTimeFormatter_yyyyMMdd))
for(DateTimeFormatter dateTimeFormatter : List.of(dateTimeFormatter_yyyyMMddWithDashes, dateTimeFormatter_MdyyyyWithSlashes, dateTimeFormatter_yyyyMMdd, dateTimeFormatter_MdyyWithSlashes))
{
try
{

View File

@ -18,22 +18,16 @@
</File>
</Appenders>
<Loggers>
<Logger name="org.apache.log4j.xml" additivity="false">
</Logger>
<Logger name="org.mongodb.driver" level="WARN">
</Logger>
<Logger name="org.eclipse.jetty" level="INFO">
</Logger>
<Logger name="io.javalin" level="INFO">
</Logger>
<Logger name="org.apache.log4j.xml" additivity="false" />
<Logger name="org.mongodb.driver" level="WARN" />
<Logger name="org.eclipse.jetty" level="INFO" />
<Logger name="io.javalin" level="INFO" />
<!-- c3p0 -->
<Logger name="com.mchange.v2" level="INFO">
</Logger>
<Logger name="org.quartz" level="INFO">
</Logger>
<Logger name="liquibase" level="INFO">
</Logger>
<Root level="all">
<Logger name="com.mchange.v2" level="INFO" />
<Logger name="org.quartz" level="INFO" />
<Logger name="liquibase" level="INFO" />
<Logger name="com.amazonaws" level="INFO" />
<Root level="INFO">
<AppenderRef ref="SystemOutAppender"/>
<AppenderRef ref="SyslogAppender"/>
<!-- <AppenderRef ref="LogFileAppender"/> -->