From 9837e3a5b94208394a2e200c42fd4da0b75460fe Mon Sep 17 00:00:00 2001 From: igor Date: Sun, 14 Sep 2025 14:48:36 +0500 Subject: [PATCH] JSON log --- org-ccalm-main.yml | 4 +- pom.xml | 14 ++++--- src/main/resources/logback-spring.xml | 42 +++++++++++++++---- .../resources/templates/engine/index.html | 6 +-- src/main/resources/templates/index_old.html | 2 +- src/main/resources/templates/test.html | 2 +- 6 files changed, 49 insertions(+), 21 deletions(-) diff --git a/org-ccalm-main.yml b/org-ccalm-main.yml index 74cf477..f49dccd 100644 --- a/org-ccalm-main.yml +++ b/org-ccalm-main.yml @@ -10,8 +10,8 @@ spring: application: name: org-ccalm-main datasource: - #url: jdbc:postgresql://10.0.0.1:5432/CCALM?ApplicationName=org_ccalm_main&connectTimeout=10000&socketTimeout=30000 - url: jdbc:postgresql://ccalm.org:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000 + url: jdbc:postgresql://10.0.0.1:5432/CCALM?ApplicationName=org_ccalm_main&connectTimeout=10000&socketTimeout=30000 + #url: jdbc:postgresql://ccalm.org:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000 #url: jdbc:postgresql://127.0.0.1:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000 username: postgres password: 309A86FF65A78FB428F4E38DFE35F730 diff --git a/pom.xml b/pom.xml index 718c34a..d4cc27f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.4.2 + 3.5.5 org.ccalm @@ -81,11 +81,7 @@ - - net.logstash.logback - logstash-logback-encoder - 7.4 - + edu.ucar @@ -144,6 +140,12 @@ provided + + net.logstash.logback + logstash-logback-encoder + 8.1 + + diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 14cb335..4f1e9b8 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,7 +1,8 @@ - + + @@ -9,15 +10,38 @@ ${LOGS}/${appName}.log - + - timestamp - thread + timestamp level - logger message - exception + exception + [ignore] + [ignore] + [ignore] + [ignore] + [ignore] + + + yyyy-MM-dd'T'HH:mm:ss.SSS'Z' + UTC + + + true + + + false + false + + + + 1 + 1024 + 20 + $$FastClassByCGLIB$$ + $$EnhancerBySpringCGLIB$$ + ${LOGS}/${appName}.%d{yyyy-MM-dd}.%i.log @@ -29,11 +53,13 @@ - %d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'} | %level | %logger{36} | %msg%n + + %d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'} | %level | %logger{36} | %marker | %msg%n + - + diff --git a/src/main/resources/templates/engine/index.html b/src/main/resources/templates/engine/index.html index 9295c2b..14f3b52 100644 --- a/src/main/resources/templates/engine/index.html +++ b/src/main/resources/templates/engine/index.html @@ -30,7 +30,7 @@ - + @@ -1411,8 +1411,8 @@ new Calendar({ if(opt!=null) opt.selected = true; }); - //getJsonData(url+"geodatalist/GeoTIFF?fn=smap_list", - getJsonData("https://geoserver.ccalm.org/geodatalist/GeoTIFF?fn=smap_list", + getJsonData(url+"geodatalist/GeoTIFF?fn=smap_list", + //getJsonData("https://geoserver.ccalm.org/geodatalist/GeoTIFF?fn=smap_list", function(result){ let list = document.getElementById("filter_smap_day"); let opt=null; diff --git a/src/main/resources/templates/index_old.html b/src/main/resources/templates/index_old.html index fdc8c78..554188b 100644 --- a/src/main/resources/templates/index_old.html +++ b/src/main/resources/templates/index_old.html @@ -5,7 +5,7 @@ Automated system of data collection - + diff --git a/src/main/resources/templates/test.html b/src/main/resources/templates/test.html index c969d89..71cdb48 100644 --- a/src/main/resources/templates/test.html +++ b/src/main/resources/templates/test.html @@ -10,7 +10,7 @@ - +