Mercurial > cgi-bin > hgweb.cgi > ClipMan
changeset 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 | c56a0747c256 |
children | a30deee457e3 |
files | .hgignore src/name/blackcap/clipman/Files.kt src/name/blackcap/clipman/Main.kt |
diffstat | 3 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Thu Apr 28 20:53:39 2022 -0700 +++ b/.hgignore Sun Jan 12 10:22:05 2025 -0800 @@ -1,4 +1,9 @@ ~$ \.bak$ -^work/ -^bundles/ +\.class$ +\.dylib$ +\.o$ +^\.idea/ +^target/ +^out/ +^#.*#$
--- a/src/name/blackcap/clipman/Files.kt Thu Apr 28 20:53:39 2022 -0700 +++ b/src/name/blackcap/clipman/Files.kt Sun Jan 12 10:22:05 2025 -0800 @@ -55,6 +55,7 @@ } val PROP_FILE = File(PF_DIR, SHORTNAME + ".properties") val LOG_FILE = File(LF_DIR, SHORTNAME + ".log") +val ERR_FILE = File(LF_DIR, SHORTNAME + ".err") /* make some needed directories */
--- 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) +}