Created
October 8, 2018 20:42
-
-
Save eval/43e74e61807580757fa63e9f632c0816 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:paths | |
["."] | |
:deps | |
{org.clojure/clojurescript {:mvn/version "1.10.339" | |
#_#_:git/url "https://github.com/clojure/clojurescript.git" | |
#_#_:sha "6eedd0a08c49f7b0d4dcb30977b2fb38c90577bd"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns foo | |
(:require [goog.log :as glog]) | |
(:import goog.debug.Console)) | |
(def logger | |
(glog/getLogger "app")) | |
(def console (goog.debug.Console.)) | |
(defn workaround! [] | |
(.setConsole goog.debug.Console js/console)) | |
(defn -main [& args] | |
(.setCapturing console true) | |
(.setLevel logger goog.debug.Logger.Level.FINEST) | |
(when args | |
(workaround!)) | |
(glog/error logger "some error")) | |
(set! *main-cli-fn* -main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment