Fork me on GitHub
#dirac
<
2017-01-04
>
richiardiandrea18:01:11

@darwin sorry for my ignorance but what does :print-config-overrides do in cljs-devtools?

richiardiandrea18:01:31

Second question, are you using any lib are for logging preserving the nice cljs-devtools formatting or plain (.x js/console ...)?

darwin19:01:19

@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

richiardiandrea19:01:56

oh ok, I am also trying cljs-oops after long time I wanted to 🙂

darwin19:01:28

as of logging, I’ve been using simple hand-made adhoc macros wrapping js/console.log and friends

darwin19:01:50

I’m going to finish this library which will solve my logging needs: https://github.com/binaryage/clearcut

darwin19:01:23

got derailed before Christmas, hopefully I will get back to it soon

richiardiandrea19:01:46

oh awesome, I can be your alpha tester!

darwin19:01:26

if you have experience with other logging libraries, it would be nice to brainstorm on the right feature-set

darwin19:01:20

my main goal is to provide unified interface for both clojure and clojurescript, and want it to be cljs-devtools friendly out-the-box

richiardiandrea19:01:24

the thing is, clojure.logging is a bit behind the "new stuff"

richiardiandrea20:01:06

for instance in java land, log4j2 is much more advanced (and at this point reliable) than classic log4j

richiardiandrea20:01:42

but clogging does not try to load it, you have actually to pass by slf4j

darwin20:01:19

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

darwin20:01:09

the codebase is pretty confusing right now, because I forked cljs-oops, I will reuse a bit of code/infrastructure from that project

darwin20:01:45

it will heavily depend on macros and generate tailored output in dev-mode and release mode

darwin20:01:54

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

richiardiandrea20:01:57

sounds good, time is scarce I have to say...as usual, but I'll try my best

darwin20:01:55

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

darwin20:01:12

I’m pretty happy with what clojure.tools.logging offers

darwin20:01:22

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

richiardiandrea20:01:56

yes I actually had only one custom feature to add (and it is a JIRA issue as well): custom levels

richiardiandrea20:01:36

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

richiardiandrea20:01:48

and that level was called profile

darwin20:01:12

yes, this will be easy to do

richiardiandrea20:01:37

I had to hack it because clojure.tools.logging does not support it and throws

richiardiandrea20:01:52

the levels are hardcoded now

richiardiandrea20:01:58

did not have time for a patch

darwin20:01:32

you are right, log levels seem to be hardcoded there