Skip to content

Commit 26c8cb1

Browse files
author
Wenjun Che
committed
ADAP-15: java.util.logging for logging
1 parent d820ed1 commit 26c8cb1

4 files changed

Lines changed: 24 additions & 2 deletions

File tree

release/logging.properties

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Properties file which configures the operation of the JDK
2+
# logging facility.
3+
4+
# The system will look for this config file, first using
5+
# a System property specified at startup:
6+
#
7+
# >java -Djava.util.logging.config.file=myLoggingConfigFilePath
8+
9+
#handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
10+
handlers=java.util.logging.ConsoleHandler
11+
12+
# Default global logging level.
13+
# Loggers and Handlers may override this level
14+
.level=INFO
15+
16+
# Limit the message that are printed on the console to INFO and above.
17+
java.util.logging.ConsoleHandler.level = INFO
18+
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
19+
20+
# Log level for all OpenFin classes
21+
com.openfin.level=INFO
-2.5 MB
Binary file not shown.

release/run.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
java -cp openfin-desktop-java-example-3.0.1.2.jar;openfin-desktop-java-adapter-3.0.1.2.jar;TableLayout-20050920.jar -DOpenFinOption=--config=\"https://demoappdirectory.openf.in/desktop/config/apps/OpenFin/HelloOpenFin/app.json\" com.openfin.desktop.demo.OpenFinDesktopDemo
1+
java -cp openfin-desktop-java-example-3.0.1.2.jar;openfin-desktop-java-adapter-3.0.1.3.jar;TableLayout-20050920.jar -DOpenFinOption=--config=\"https://demoappdirectory.openf.in/desktop/config/apps/OpenFin/HelloOpenFin/app.json\" -Djava.util.logging.config.file=logging.properties com.openfin.desktop.demo.OpenFinDesktopDemo

src/main/java/com/openfin/desktop/demo/OpenFinDesktopDemo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
import java.util.ArrayList;
2020
import java.util.HashMap;
2121
import java.util.Random;
22+
import java.util.logging.Logger;
2223

2324
/**
2425
* GUI example that allows for instantiating and controlling
2526
*/
2627
public class OpenFinDesktopDemo extends JPanel implements ActionListener, WindowListener {
28+
private final static Logger logger = Logger.getLogger(OpenFinDesktopDemo.class.getName());
2729

2830

2931
private static JFrame jFrame;
@@ -62,7 +64,6 @@ public OpenFinDesktopDemo(final String desktopCommandLine, String startupUUID) {
6264
this.startupUUID = startupUUID;
6365
try {
6466
this.controller = new DesktopConnection("OpenFinDesktopDemoJava", "localhost", 9696);
65-
this.controller.setLogLevel(true);
6667
} catch (DesktopException desktopError) {
6768
desktopError.printStackTrace();
6869
}

0 commit comments

Comments
 (0)