Merge branch 'master' of https://git.dirt.kz/igor/CCALM_weather
# Conflicts: # pom.xml # src/main/java/org/ccalm/weather/AirTemperature.java # src/main/java/org/ccalm/weather/SoilTmperature.java
This commit is contained in:
2
pom.xml
2
pom.xml
@ -80,7 +80,7 @@
|
|||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<!--plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.2.0</version>
|
||||||
|
|||||||
@ -256,6 +256,13 @@ public class Precipitation implements ServletContextAware {
|
|||||||
logger.error("N6:"+ex.getMessage(),ex);
|
logger.error("N6:"+ex.getMessage(),ex);
|
||||||
}
|
}
|
||||||
logger.info("Delete old data 3");
|
logger.info("Delete old data 3");
|
||||||
|
try {
|
||||||
|
String sql="delete from main.precipitation_dates where date=cast(to_timestamp('"+date+" "+time+"', 'YYYYMMDD HH24') as timestamp without time zone) and hours="+forecast;
|
||||||
|
st.executeUpdate(sql);
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
logger.info(ex.getMessage());
|
||||||
|
}
|
||||||
|
System.out.println("Delete old data 3");
|
||||||
try {
|
try {
|
||||||
String sql="delete from main.precipitation where date<=CURRENT_DATE-'730 days'::INTERVAL";
|
String sql="delete from main.precipitation where date<=CURRENT_DATE-'730 days'::INTERVAL";
|
||||||
st.executeUpdate(sql);
|
st.executeUpdate(sql);
|
||||||
|
|||||||
19
src/main/resources/log4j2.xml
Normal file
19
src/main/resources/log4j2.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="INFO">
|
||||||
|
<Appenders>
|
||||||
|
<!-- Ротирующий файловый аппендер -->
|
||||||
|
<RollingFile name="RollingFile" fileName="logs/application.log"
|
||||||
|
filePattern="logs/application-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
|
||||||
|
<Policies>
|
||||||
|
<SizeBasedTriggeringPolicy size="100 MB"/>
|
||||||
|
</Policies>
|
||||||
|
<DefaultRolloverStrategy max="10"/>
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="ALL">
|
||||||
|
<AppenderRef ref="RollingFile"/>
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
Reference in New Issue
Block a user