File tree 4 files changed +57
-10
lines changed
com/marginallyClever/nodeGraphSwing
4 files changed +57
-10
lines changed Original file line number Diff line number Diff line change 73
73
<scope >test</scope >
74
74
</dependency >
75
75
<!-- for logging -->
76
- <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
77
- <dependency >
78
- <groupId >org.slf4j</groupId >
79
- <artifactId >slf4j-api</artifactId >
80
- <version >1.7.35</version >
81
- </dependency >
82
- <!-- for logging -->
83
76
<dependency >
84
77
<groupId >ch.qos.logback</groupId >
85
78
<artifactId >logback-classic</artifactId >
86
79
<version >1.2.11</version >
87
80
</dependency >
81
+ <!-- for logging -->
82
+ <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
83
+ <dependency >
84
+ <groupId >org.slf4j</groupId >
85
+ <artifactId >slf4j-api</artifactId >
86
+ <version >2.0.0-alpha4</version >
87
+ </dependency >
88
88
</dependencies >
89
89
90
90
<build >
252
252
</configuration >
253
253
</plugin >
254
254
</plugins >
255
+
256
+
257
+ <pluginManagement >
258
+ <plugins >
259
+ <plugin >
260
+ <artifactId >maven-assembly-plugin</artifactId >
261
+ <version >3.3.0</version >
262
+ </plugin >
263
+ <plugin >
264
+ <artifactId >maven-dependency-plugin</artifactId >
265
+ <version >3.1.2</version >
266
+ </plugin >
267
+ <plugin >
268
+ <artifactId >maven-release-plugin</artifactId >
269
+ <version >2.5.3</version >
270
+ </plugin >
271
+ <plugin >
272
+ <artifactId >maven-antrun-plugin</artifactId >
273
+ <version >3.0.0</version >
274
+ </plugin >
275
+ </plugins >
276
+ </pluginManagement >
255
277
</build >
256
278
257
279
<properties >
Original file line number Diff line number Diff line change
1
+ package com .marginallyClever .nodeGraphSwing ;
2
+
3
+ import ch .qos .logback .core .rolling .TriggeringPolicyBase ;
4
+
5
+ import java .io .File ;
6
+
7
+ /**
8
+ * Logback policy referenced in logback.xml in order to get a new file at each start of the application
9
+ * @param <E>
10
+ */
11
+ public class RollOncePerSessionTriggeringPolicy <E > extends TriggeringPolicyBase <E > {
12
+ private static boolean doRolling = true ;
13
+
14
+ @ Override
15
+ public boolean isTriggeringEvent (File activeFile , E event ) {
16
+ // roll the first time when the event gets called
17
+ if (doRolling ) {
18
+ doRolling = false ;
19
+ return true ;
20
+ }
21
+ return false ;
22
+ }
23
+ }
24
+
Original file line number Diff line number Diff line change 9
9
requires java .desktop ;
10
10
requires org .json ;
11
11
requires org .slf4j ;
12
+ requires logback .core ;
12
13
13
14
uses com .marginallyClever .nodeGraphCore .NodeRegistry ;
14
15
provides com .marginallyClever .nodeGraphCore .NodeRegistry with
Original file line number Diff line number Diff line change 10
10
</encoder >
11
11
</appender >
12
12
13
- <logger name =" com.marginallyClever.makelangelo. nodeGraphSwing" level =" debug" />
13
+ <logger name =" com.marginallyClever.nodeGraphSwing.Donatello " level =" debug" />
14
14
<root >
15
15
<appender-ref ref =" STDOUT" />
16
16
</root >
20
20
<appender name =" FILE" class =" ch.qos.logback.core.rolling.RollingFileAppender" >
21
21
<file >${user.home}/.makelangelo/makelangelo.log</file >
22
22
<rollingPolicy class =" ch.qos.logback.core.rolling.FixedWindowRollingPolicy" >
23
- <fileNamePattern >${user.home}/.makelangelo/makelangelo .%i.log</fileNamePattern >
23
+ <fileNamePattern >${user.home}/Donatello/donatello .%i.log</fileNamePattern >
24
24
<minIndex >1</minIndex >
25
25
<maxIndex >1</maxIndex >
26
26
</rollingPolicy >
27
27
28
- <triggeringPolicy class =" com.marginallyClever.convenience.log .RollOncePerSessionTriggeringPolicy" />
28
+ <triggeringPolicy class =" com.marginallyClever.nodeGraphSwing .RollOncePerSessionTriggeringPolicy" />
29
29
<encoder >
30
30
<pattern >%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern >
31
31
</encoder >
You can’t perform that action at this time.
0 commit comments