Skip to content

Commit 43e295a

Browse files
committed
added support for:
- log4j - retrofit2 - rxjava3
1 parent c30f335 commit 43e295a

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Mon Oct 14 13:14:30 GMT+03:00 2019
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

main_project/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@ ext.moduleName = 'main_project'
88

99
dependencies {
1010
implementation project(':utils_project')
11+
12+
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.1'
13+
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.1'
14+
15+
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
16+
implementation 'io.reactivex.rxjava3:rxjava:3.0.0-RC3'
17+
1118
testCompile group: 'junit', name: 'junit', version: '4.12'
1219
}

main_project/src/main/java/com/igor/main/Main.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.igor.utils.Service;
44

55
public class Main {
6+
67
public static void main(String[] args) {
78
Service service = new Service();
89
}

main_project/src/main/java/com/igor/main/MainApplication.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,29 @@
44
import javafx.application.Application;
55
import javafx.scene.Scene;
66
import javafx.stage.Stage;
7+
import org.apache.logging.log4j.Logger;
8+
import org.apache.logging.log4j.LogManager;
9+
710

811
public class MainApplication extends Application {
912

13+
private static final Logger LOGGER = LogManager.getLogger(MainApplication.class.getName());
14+
1015
public static void main(String[] args) {
1116
launch(args);
1217
}
1318

1419
@Override
15-
public void start(Stage primaryStage) {
20+
public void start(Stage primaryStage) throws InterruptedException {
21+
22+
LOGGER.info("Start primary stage");
23+
1624
UtilsStackPane root = new UtilsStackPane();
1725
Scene scene = new Scene(root);
1826
primaryStage.setScene(scene);
1927
primaryStage.show();
28+
29+
2030
}
31+
2132
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module main_project {
22
requires utils_project;
3+
requires retrofit2;
4+
requires io.reactivex.rxjava3;
5+
requires org.apache.logging.log4j;
36
exports com.igor.main;
7+
48
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN">
3+
<Properties>
4+
<Property name="appenderPatternLayout">%d{dd.MM.yyyy HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
5+
<Property name="path">logs</Property>
6+
</Properties>
7+
8+
<Appenders>
9+
<Console name="Console" target="SYSTEM_OUT">
10+
<PatternLayout pattern="${appenderPatternLayout}"/>
11+
</Console>
12+
13+
<File name="File" fileName="${path}/multiModuleJava9plusJavaFXSupport.log">
14+
<PatternLayout pattern="${appenderPatternLayout}"/>
15+
</File>
16+
</Appenders>
17+
<Loggers>
18+
<Root level="TRACE">
19+
<AppenderRef ref="Console"/>
20+
21+
<!-- Uncomment this for logging to file
22+
<AppenderRef ref="File"/>
23+
-->
24+
25+
</Root>
26+
</Loggers>
27+
</Configuration>

0 commit comments

Comments
 (0)