@darwin sorry for my ignorance but what does :print-config-overrides
do in cljs-devtools
?
Second question, are you using any lib are for logging preserving the nice cljs-devtools
formatting or plain (.x js/console ...)
?
@richiardiandrea :print-config-overrides true
prints a diff between defaults and your effective preferences:
https://github.com/binaryage/cljs-devtools/blob/master/src/lib/devtools/core.cljs#L49
oh ok, I am also trying cljs-oops
after long time I wanted to 🙂
as of logging, I’ve been using simple hand-made adhoc macros wrapping js/console.log and friends
something like this for example: https://github.com/binaryage/dirac/blob/master/src/background/dirac/background/logging.clj
cool thanks! I am going to try this too: https://github.com/postspectacular/cljs-log
ah, it is not going to work I think: https://github.com/postspectacular/cljs-log/blob/master/src/cljs_log/core.clj#L17
I’m going to finish this library which will solve my logging needs: https://github.com/binaryage/clearcut
got derailed before Christmas, hopefully I will get back to it soon
oh awesome, I can be your alpha tester!
if you have experience with other logging libraries, it would be nice to brainstorm on the right feature-set
I have some yes
my main goal is to provide unified interface for both clojure and clojurescript, and want it to be cljs-devtools friendly out-the-box
the thing is, clojure.logging
is a bit behind the "new stuff"
for instance in java land, log4j2 is much more advanced (and at this point reliable) than classic log4j
but clogging
does not try to load it, you have actually to pass by slf4j
unfortunately I don’t have time to discuss it right now, added you as a collaborator, feel free to open a wiki page with ideas, or edit readme, or drop me an email if you get to it
the codebase is pretty confusing right now, because I forked cljs-oops, I will reuse a bit of code/infrastructure from that project
it will heavily depend on macros and generate tailored output in dev-mode and release mode
for example in release mode under cljs it will intelligently pprint string previews of logged objects, because it is expected that cljs-devtools is not present in advanced builds
sounds good, time is scarce I have to say...as usual, but I'll try my best
no pressure, also I don’t promise to incorporate any of proposed ideas, I’m going to build this primarily for myself, and I don’t have advanced logging needs for clojure side, for example
I’m pretty happy with what clojure.tools.logging offers
the most advanced things so far: for dirac I wrote custom formatting for log4j: https://github.com/binaryage/dirac/blob/master/src/logging/dirac/logging/format.clj
yes I actually had only one custom feature to add (and it is a JIRA issue as well): custom levels
sometimes you want a custom level in java, for instance I was logging performance stuff and I wanted to be able to filter that out through configuration
and that level was called profile
yes, this will be easy to do
I had to hack it because clojure.tools.logging
does not support it and throws
the levels are hardcoded now
did not have time for a patch
you are right, log levels seem to be hardcoded there