File tree Expand file tree Collapse file tree 4 files changed +57
-10
lines changed
com/marginallyClever/nodeGraphSwing Expand file tree Collapse file tree 4 files changed +57
-10
lines changed Original file line number Diff line number Diff line change 7373 <scope >test</scope >
7474 </dependency >
7575 <!-- 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 -->
8376 <dependency >
8477 <groupId >ch.qos.logback</groupId >
8578 <artifactId >logback-classic</artifactId >
8679 <version >1.2.11</version >
8780 </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 >
8888 </dependencies >
8989
9090 <build >
252252 </configuration >
253253 </plugin >
254254 </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 >
255277 </build >
256278
257279 <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 99 requires java .desktop ;
1010 requires org .json ;
1111 requires org .slf4j ;
12+ requires logback .core ;
1213
1314 uses com .marginallyClever .nodeGraphCore .NodeRegistry ;
1415 provides com .marginallyClever .nodeGraphCore .NodeRegistry with
Original file line number Diff line number Diff line change 1010 </encoder >
1111 </appender >
1212
13- <logger name =" com.marginallyClever.makelangelo. nodeGraphSwing" level =" debug" />
13+ <logger name =" com.marginallyClever.nodeGraphSwing.Donatello " level =" debug" />
1414 <root >
1515 <appender-ref ref =" STDOUT" />
1616 </root >
2020 <appender name =" FILE" class =" ch.qos.logback.core.rolling.RollingFileAppender" >
2121 <file >${user.home}/.makelangelo/makelangelo.log</file >
2222 <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 >
2424 <minIndex >1</minIndex >
2525 <maxIndex >1</maxIndex >
2626 </rollingPolicy >
2727
28- <triggeringPolicy class =" com.marginallyClever.convenience.log .RollOncePerSessionTriggeringPolicy" />
28+ <triggeringPolicy class =" com.marginallyClever.nodeGraphSwing .RollOncePerSessionTriggeringPolicy" />
2929 <encoder >
3030 <pattern >%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern >
3131 </encoder >
You can’t perform that action at this time.
0 commit comments