Skip to content

Commit af0ff79

Browse files
phasenraum2010phasenraum2010
authored andcommitted
changed logging
1 parent d020bda commit af0ff79

File tree

8 files changed

+250
-20
lines changed

8 files changed

+250
-20
lines changed

src/main/java/org/woehlke/learn/learnneo4j/configuration/properties/SpringAppProperties.java

Lines changed: 121 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,29 @@ public class SpringAppProperties {
3737
public static class Datasource {
3838

3939
@NotNull
40-
private String driverClassName;
40+
private String url;
4141

4242
@NotNull
43-
private String platform;
43+
private String driverClassName;
4444

4545
@NotNull
46-
private String url;
46+
private String platform;
4747

4848
@NotNull
4949
private Boolean continueOnError;
5050

5151
@NotNull
5252
private String schema;
5353

54+
@NotNull
55+
private Boolean generateUniqueName;
56+
57+
@NotNull
58+
private String name;
59+
60+
@NotNull
61+
private String type;
62+
5463
public String getDriverClassName() {
5564
return driverClassName;
5665
}
@@ -90,6 +99,44 @@ public String getSchema() {
9099
public void setSchema(String schema) {
91100
this.schema = schema;
92101
}
102+
103+
public Boolean getGenerateUniqueName() {
104+
return generateUniqueName;
105+
}
106+
107+
public void setGenerateUniqueName(Boolean generateUniqueName) {
108+
this.generateUniqueName = generateUniqueName;
109+
}
110+
111+
public String getName() {
112+
return name;
113+
}
114+
115+
public void setName(String name) {
116+
this.name = name;
117+
}
118+
119+
public String getType() {
120+
return type;
121+
}
122+
123+
public void setType(String type) {
124+
this.type = type;
125+
}
126+
127+
@Override
128+
public String toString() {
129+
return "Datasource{" +
130+
"url='" + url + '\'' +
131+
", driverClassName='" + driverClassName + '\'' +
132+
", platform='" + platform + '\'' +
133+
", continueOnError=" + continueOnError +
134+
", schema='" + schema + '\'' +
135+
", generateUniqueName=" + generateUniqueName +
136+
", name='" + name + '\'' +
137+
", type='" + type + '\'' +
138+
'}';
139+
}
93140
}
94141

95142
@Validated
@@ -144,6 +191,13 @@ public String getDialect() {
144191
public void setDialect(String dialect) {
145192
this.dialect = dialect;
146193
}
194+
195+
@Override
196+
public String toString() {
197+
return "Hibernate{" +
198+
"dialect='" + dialect + '\'' +
199+
'}';
200+
}
147201
}
148202

149203
public Hibernate getHibernate() {
@@ -154,6 +208,12 @@ public void setHibernate(Hibernate hibernate) {
154208
this.hibernate = hibernate;
155209
}
156210

211+
@Override
212+
public String toString() {
213+
return "Properties{" +
214+
"hibernate=" + hibernate +
215+
'}';
216+
}
157217
}
158218

159219
public Hibernate getHibernate() {
@@ -196,6 +256,16 @@ public void setOpenInView(Boolean openInView) {
196256
this.openInView = openInView;
197257
}
198258

259+
@Override
260+
public String toString() {
261+
return "Jpa{" +
262+
"generateDdl=" + generateDdl +
263+
", showSql=" + showSql +
264+
", openInView=" + openInView +
265+
", hibernate=" + hibernate +
266+
", properties=" + properties +
267+
'}';
268+
}
199269
}
200270

201271
@Validated
@@ -226,6 +296,13 @@ public Boolean getEnabled() {
226296
public void setEnabled(Boolean enabled) {
227297
this.enabled = enabled;
228298
}
299+
300+
@Override
301+
public String toString() {
302+
return "Initializer{" +
303+
"enabled=" + enabled +
304+
'}';
305+
}
229306
}
230307

231308
public Initializer getInitializer() {
@@ -235,6 +312,13 @@ public Initializer getInitializer() {
235312
public void setInitializer(Initializer initializer) {
236313
this.initializer = initializer;
237314
}
315+
316+
@Override
317+
public String toString() {
318+
return "Jdbc{" +
319+
"initializer=" + initializer +
320+
'}';
321+
}
238322
}
239323

240324
public String getStoreType() {
@@ -252,6 +336,14 @@ public Jdbc getJdbc() {
252336
public void setJdbc(Jdbc jdbc) {
253337
this.jdbc = jdbc;
254338
}
339+
340+
@Override
341+
public String toString() {
342+
return "Session{" +
343+
"storeType='" + storeType + '\'' +
344+
", jdbc=" + jdbc +
345+
'}';
346+
}
255347
}
256348

257349
@Validated
@@ -267,6 +359,13 @@ public Boolean getCache() {
267359
public void setCache(Boolean cache) {
268360
this.cache = cache;
269361
}
362+
363+
@Override
364+
public String toString() {
365+
return "Template{" +
366+
"cache=" + cache +
367+
'}';
368+
}
270369
}
271370

272371
@Validated
@@ -282,6 +381,13 @@ public Boolean getCache() {
282381
public void setCache(Boolean cache) {
283382
this.cache = cache;
284383
}
384+
385+
@Override
386+
public String toString() {
387+
return "Thymeleaf{" +
388+
"cache=" + cache +
389+
'}';
390+
}
285391
}
286392

287393
public Datasource getDatasource() {
@@ -332,8 +438,20 @@ public void setProfiles(String profiles) {
332438
this.profiles = profiles;
333439
}
334440

441+
335442
@Override
336443
public String toString() {
444+
return "SpringAppProperties{" +
445+
"profiles='" + profiles + '\'' +
446+
", datasource=" + datasource +
447+
", jpa=" + jpa +
448+
", session=" + session +
449+
", template=" + template +
450+
", thymeleaf=" + thymeleaf +
451+
'}';
452+
}
453+
454+
public String toString2() {
337455
List<String> outputLines = new ArrayList<>();
338456
outputLines.add("spring.profiles = "+this.getProfiles());
339457
outputLines.add("spring.template.cache = "+this.getTemplate().getCache());

src/main/java/org/woehlke/learn/learnneo4j/model/graph/maintainer/MaintainerServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.springframework.transaction.annotation.Transactional;
88
import org.woehlke.learn.learnneo4j.model.graph.Maintainer;
99
import org.woehlke.learn.learnneo4j.model.common.Neo4jServiceImpl;
10-
import org.woehlke.learn.learnneo4j.model.graph.platform.PlatformServiceImpl;
1110

1211
@Service
1312
@Transactional

src/main/java/org/woehlke/learn/learnneo4j/model/graph/port/PortServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.woehlke.learn.learnneo4j.model.graph.license.LicenseRepository;
1313
import org.woehlke.learn.learnneo4j.model.graph.maintainer.MaintainerRepository;
1414
import org.woehlke.learn.learnneo4j.model.graph.platform.PlatformRepository;
15-
import org.woehlke.learn.learnneo4j.model.graph.variant.VariantServiceImpl;
1615

1716
@Service
1817
@Transactional

src/main/java/org/woehlke/learn/learnneo4j/model/graph/variant/VariantServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import org.springframework.beans.factory.annotation.Autowired;
66
import org.springframework.stereotype.Service;
77
import org.springframework.transaction.annotation.Transactional;
8-
import org.woehlke.learn.learnneo4j.frontend.control.open.home.WelcomeServiceImpl;
98
import org.woehlke.learn.learnneo4j.model.graph.Variant;
109
import org.woehlke.learn.learnneo4j.model.common.Neo4jServiceImpl;
1110

src/main/resources/application.yml

Lines changed: 90 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1+
endpoints:
2+
env:
3+
- keys-to-sanitize: "password"
4+
- keys-to-sanitize: "secret"
5+
- keys-to-sanitize: "key"
6+
- keys-to-sanitize: "passwort"
7+
health:
8+
sensitive: false
9+
endpoints:
10+
shutdown:
11+
enabled: false
12+
server:
13+
error:
14+
path: /fehler
15+
compression:
16+
enabled: true
17+
min-response-size: 2048
18+
hibernate:
19+
dialect: org.hibernate.dialect.PostgreSQL94Dialect
20+
info:
21+
application:
22+
artifactId: @project.artifactId@
23+
description: @project.description@
24+
groupId: @project.groupId@
25+
name: @project.name@
26+
version: @project.version@
27+
management:
28+
address: 127.0.0.1
29+
context-path: "/manage"
30+
security:
31+
enabled: true
132
spring:
33+
application:
34+
admin:
35+
enabled: false
36+
name: @project.name@
237
data:
338
neo4j:
439
open-in-view: true
@@ -18,29 +53,40 @@ spring:
1853
dao:
1954
exceptiontranslation:
2055
enabled: true
56+
datasource:
57+
url: 'jdbc:postgresql://localhost:5432/learn-neo4j?user=jdbc&password=jdbcpwd'
58+
# username: jdbc
59+
# password: jdbcpwd
60+
driver-class-name: org.postgresql.Driver
61+
generate-unique-name: true
62+
continue-on-error: true
63+
schema: classpath:org/springframework/session/jdbc/schema-postgresql.sql
64+
#name: Learnneo4jDS
65+
#type: com.zaxxer.hikari.HikariDataSource
66+
platform: POSTGRESQL
67+
tomcat:
68+
max-active: 20
2169
jpa:
2270
database-platform: org.hibernate.dialect.PostgreSQL95Dialect
2371
hibernate:
2472
ddl-auto: create-drop
2573
properties:
2674
hibernate:
75+
dialect: org.hibernate.dialect.PostgreSQL94Dialect
2776
globally_quoted_identifiers: true
2877
temp:
2978
use_jdbc_metadata_defaults: false
3079
open-in-view: true
3180
generate-ddl: true
3281
show-sql: true
33-
datasource:
34-
url: "jdbc:postgresql://localhost:5432/learn-neo4j"
35-
username: jdbc
36-
password: jdbcpwd
37-
driver-class-name: org.postgresql.Driver
38-
generate-unique-name: true
39-
continue-on-error: true
40-
schema: public
41-
name: Learnneo4jDS
42-
type: org.postgresql.jdbc3.Jdbc3PoolingDataSource
43-
platform: POSTGRESQL
82+
session:
83+
store-type: jdbc
84+
jdbc:
85+
initializer:
86+
enabled: true
87+
devtools:
88+
livereload:
89+
enabled: true
4490
template:
4591
cache: false
4692
thymeleaf:
@@ -51,7 +97,6 @@ org:
5197
woehlke:
5298
learn:
5399
learnneo4j:
54-
pageSize: 30
55100
loginUsername: tw
56101
loginPassword: blablabla
57102
filesystemWorkdir: ports
@@ -79,10 +124,41 @@ spring:
79124
---
80125
spring:
81126
profiles: travis
127+
logging:
128+
config: classpath:logback-travis.xml
129+
file: logging-travis.log
82130
---
83131
spring:
84-
profiles: smoketests
132+
profiles: alltests
133+
logging:
134+
config: classpath:logback-alltests.xml
135+
file: logging-alltests.log
85136
---
86137
spring:
87-
profiles: alltests
138+
profiles: smoketests
139+
logging:
140+
config: classpath:logback-smoketests.xml
141+
file: logging-smoketests.log
142+
level:
143+
org:
144+
woehlke:
145+
learn:
146+
learnneo4j:
147+
middleware: DEBUG
148+
model:
149+
orm:
150+
portinfo: DEBUG
151+
graph:
152+
category: DEBUG
153+
license: DEBUG
154+
maintainer: DEBUG
155+
platform: DEBUG
156+
port: DEBUG
157+
variant: DEBUG
158+
frontend:
159+
control:
160+
closed:
161+
terminal: DEBUG
162+
open:
163+
home: DEBUG
88164

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<include resource="org/springframework/boot/logging/logback/base.xml"/>
4+
<logger name="org.apache.http" level="INFO" />
5+
<logger name="org.apache.tomcat" level="INFO" />
6+
<logger name="org.springframework.boot" level="WARN" />
7+
<logger name="org.springframework.test" level="DEBUG" />
8+
<logger name="org.hibernate" level="INFO" />
9+
<logger name="ch.qos.logback" level="INFO" />
10+
<logger name="org.hibernate.SQL" level="DEBUG" />
11+
<logger name="org.woehlke.learn.learnneo4j" level="DEBUG" />
12+
<root level="INFO"></root>
13+
</configuration>

0 commit comments

Comments
 (0)