diff src/name/blackcap/clipman/Main.kt @ 63:8c6d6ad92aa1 last-old-threading

Commit most recent changes.
author David Barts <n5jrn@me.com>
date Sun, 12 Jan 2025 10:22:05 -0800
parents 88056f373a94
children ca0fab758ff9
line wrap: on
line diff
--- a/src/name/blackcap/clipman/Main.kt	Thu Apr 28 20:53:39 2022 -0700
+++ b/src/name/blackcap/clipman/Main.kt	Sun Jan 12 10:22:05 2025 -0800
@@ -217,6 +217,7 @@
 
 /* entry point */
 fun main(args: Array<String>) {
+    setUpErrors()
     LOGGER.log(Level.INFO, "beginning execution")
     if (OS.type == OS.MAC) {
         System.setProperty("apple.laf.useScreenMenuBar", "true")
@@ -226,3 +227,10 @@
         Application.initialize()
     }
 }
+
+private fun setUpErrors() {
+    val ps = java.io.PrintStream(
+        java.io.FileOutputStream(ERR_FILE), true, CHARSET)
+    System.setOut(ps)
+    System.setErr(ps)
+}