Skip to content

Commit

Permalink
Improve runtime apps logging configuration (eclipse-hawkbit#1809)
Browse files Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <[email protected]>
  • Loading branch information
avgustinmm authored Aug 9, 2024
1 parent 9dd493d commit 52b3ccf
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring configuration
spring.application.name=ddi-server
spring.main.allow-bean-definition-overriding=true
server.port=8081

# Logging configuration
logging.level.org.eclipse.hawkbit.eventbus.DeadEventListener=WARN
logging.level.org.springframework.boot.actuate.audit.listener.AuditListener=WARN
logging.level.org.hibernate.validator.internal.util.Version=WARN
# security Log with hints on potential attacks
logging.level.server-security=INFO
# logging pattern
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}

# User Security
spring.security.user.name=admin
spring.security.user.password={noop}admin
spring.main.allow-bean-definition-overriding=true

# Http Encoding
server.servlet.encoding.charset=UTF-8
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring configuration
spring.application.name=dmf-server
spring.main.allow-bean-definition-overriding=true

# Logging configuration
logging.level.org.eclipse.hawkbit.eventbus.DeadEventListener=WARN
logging.level.org.springframework.boot.actuate.audit.listener.AuditListener=WARN
logging.level.org.hibernate.validator.internal.util.Version=WARN
# security Log with hints on potential attacks
logging.level.server-security=INFO
# logging pattern
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}

# Optional events
hawkbit.server.repository.publish-target-poll-event=false

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring config
spring.application.name=mgmt-server
spring.main.allow-bean-definition-overriding=true
spring.port=8080

# Logging configuration
logging.level.org.eclipse.hawkbit.eventbus.DeadEventListener=WARN
logging.level.org.springframework.boot.actuate.audit.listener.AuditListener=WARN
logging.level.org.hibernate.validator.internal.util.Version=WARN
# security Log with hints on potential attacks
logging.level.server-security=INFO
# logging pattern
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}

# Define DEFAULT tenant admin user admin/admin
hawkbit.security.user.admin.password={noop}admin
hawkbit.security.user.admin.roles=TENANT_ADMIN
hawkbit.security.user.admin.tenant=DEFAULT
# allow to auto/implicit create DEFAULT tenant (on mgmt api call)
hawkbit.server.repository.implicitTenantCreateAllowed=true

spring.main.allow-bean-definition-overriding=true

# Http Encoding
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.enabled=true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring configuration
server.port=${PORT:8088}

# Logging configuration
logging.level.org.springframework.boot.actuate.audit.listener.AuditListener=WARN
# logging pattern
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}

### Vaadin start ###`
# build with mvn vaadin:build-frontend to enable / disable
vaadin.frontend.hotdeploy=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public class Start {
/**
* Main method to start the spring-boot application.
*
* @param args
* the VM arguments.
* @param args the VM arguments.
*/
// Exception squid:S2095 - Spring boot standard behavior
@SuppressWarnings({ "squid:S2095" })
Expand All @@ -59,4 +58,4 @@ public RedirectView redirectToSwagger(
public static class MethodSecurityConfig {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,26 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring config
spring.application.name=update-server
spring.main.allow-bean-definition-overriding=true

# Logging configuration
logging.level.org.eclipse.hawkbit.eventbus.DeadEventListener=WARN
logging.level.org.springframework.boot.actuate.audit.listener.AuditListener=WARN
logging.level.org.hibernate.validator.internal.util.Version=WARN
# security Log with hints on potential attacks
logging.level.server-security=INFO
# logging pattern
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}

# Define DEFAULT tenant admin user admin/admin
hawkbit.security.user.admin.tenant=DEFAULT
hawkbit.security.user.admin.password={noop}admin
hawkbit.security.user.admin.roles=TENANT_ADMIN
hawkbit.security.user.admin.tenant=DEFAULT
# allow to auto/implicit create DEFAULT tenant (on mgmt api call)
hawkbit.server.repository.implicitTenantCreateAllowed=true

spring.main.allow-bean-definition-overriding=true

# Http Encoding
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.enabled=true
Expand Down

This file was deleted.

4 changes: 3 additions & 1 deletion site/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
# SPDX-License-Identifier: EPL-2.0
#

# Spring configuration
spring.main.allow-bean-definition-overriding=true

# User Security
spring.security.user.name=admin
spring.security.user.password={noop}admin
spring.main.allow-bean-definition-overriding=true

# Http Encoding
server.servlet.encoding.charset=UTF-8
Expand Down
33 changes: 0 additions & 33 deletions site/src/main/resources/logback-spring.xml

This file was deleted.

0 comments on commit 52b3ccf

Please sign in to comment.