Skip to content

Commit

Permalink
Added a output window for logging major functions that are being exec…
Browse files Browse the repository at this point in the history
…uted.

To open the log window, press F4 or click the Window --> Output window menu item.
  • Loading branch information
yjjang committed Feb 4, 2016
1 parent 7302c27 commit 9ce1764
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
1 change: 0 additions & 1 deletion DesktopBranding/src/org/mongkie/desktop/branding/layer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
</folder>
<folder name="View">
<attr name="position" intvalue="200"/>
<file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
<file name="org-netbeans-core-windows-actions-ToolbarsListAction.shadow_hidden"/>
</folder>
<folder name="Tools">
Expand Down
8 changes: 4 additions & 4 deletions VisualizationUI/nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=8f85d09d
build.xml.data.CRC32=7adeee89
build.xml.script.CRC32=766c5b8e
build.xml.stylesheet.CRC32=a56c6a5b@2.56.1
build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=8f85d09d
nbproject/build-impl.xml.data.CRC32=7adeee89
nbproject/build-impl.xml.script.CRC32=74280f6c
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.56.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
8 changes: 8 additions & 0 deletions VisualizationUI/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
<specification-version>7.62.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.io</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.45.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.modules</code-name-base>
<build-prerequisite/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
*/
package org.mongkie.ui.visualization.util;

import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.logging.*;
import org.openide.awt.StatusDisplayer;
import org.openide.windows.IOProvider;
import org.openide.windows.InputOutput;

/**
*
Expand All @@ -44,7 +49,18 @@ public void publish(LogRecord record) {
if (!isLoggable(record)) {
return;
}
StatusDisplayer.getDefault().setStatusText(getFormatter().formatMessage(record));
String msg = getFormatter().formatMessage(record);
StatusDisplayer.getDefault().setStatusText(msg);
StringBuilder b = new StringBuilder();
Instant instant = Instant.ofEpochMilli(record.getMillis());
ZonedDateTime timestamp = ZonedDateTime.ofInstant(instant, ZoneId.systemDefault());
b.append(timestamp.toLocalTime().toString());
b.append(' ');
b.append(msg);
InputOutput io = IOProvider.getDefault().getIO("Logs", false);
io.getOut().println(b.toString());
io.getOut().close();
// io.select();
}

@Override
Expand Down
3 changes: 0 additions & 3 deletions nbproject/platform.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ disabled.modules=\
org.netbeans.api.search,\
org.netbeans.api.visual,\
org.netbeans.core.execution,\
org.netbeans.core.io.ui,\
org.netbeans.core.multitabs,\
org.netbeans.core.multiview,\
org.netbeans.core.nativeaccess,\
org.netbeans.core.netigso,\
org.netbeans.core.network,\
org.netbeans.core.osgi,\
org.netbeans.core.output2,\
org.netbeans.lib.uihandler,\
org.netbeans.libs.felix,\
org.netbeans.libs.javafx,\
Expand All @@ -31,7 +29,6 @@ disabled.modules=\
org.netbeans.modules.keyring.fallback,\
org.netbeans.modules.keyring.impl,\
org.netbeans.modules.netbinox,\
org.netbeans.modules.options.keymap,\
org.netbeans.modules.print,\
org.netbeans.modules.sendopts,\
org.netbeans.modules.spi.actions,\
Expand Down

0 comments on commit 9ce1764

Please sign in to comment.