dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
richiardiandrea 2017-01-04T18:56:11.001245Z

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

richiardiandrea 2017-01-04T18:57:31.001247Z

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

2017-01-04T19:53:19.001249Z

@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

richiardiandrea 2017-01-04T19:53:56.001251Z

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

2017-01-04T19:54:28.001252Z

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

2017-01-04T19:54:52.001253Z

something like this for example: https://github.com/binaryage/dirac/blob/master/src/background/dirac/background/logging.clj

richiardiandrea 2017-01-04T19:55:11.001255Z

cool thanks! I am going to try this too: https://github.com/postspectacular/cljs-log

richiardiandrea 2017-01-04T19:55:42.001257Z

ah, it is not going to work I think: https://github.com/postspectacular/cljs-log/blob/master/src/cljs_log/core.clj#L17

2017-01-04T19:55:50.001259Z

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

2017-01-04T19:56:23.001261Z

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

richiardiandrea 2017-01-04T19:56:46.001262Z

oh awesome, I can be your alpha tester!

2017-01-04T19:57:26.001263Z

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

richiardiandrea 2017-01-04T19:57:39.001264Z

I have some yes

2017-01-04T19:58:20.001265Z

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

richiardiandrea 2017-01-04T19:59:24.001266Z

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

richiardiandrea 2017-01-04T20:00:06.001267Z

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

richiardiandrea 2017-01-04T20:00:42.001268Z

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

2017-01-04T20:06:19.001269Z

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

2017-01-04T20:07:09.001270Z

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

2017-01-04T20:07:45.001271Z

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

2017-01-04T20:08:54.001272Z

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

richiardiandrea 2017-01-04T20:10:57.001273Z

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

2017-01-04T20:11:55.001274Z

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

2017-01-04T20:12:12.001275Z

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

2017-01-04T20:13:22.001278Z

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

richiardiandrea 2017-01-04T20:13:56.001280Z

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

richiardiandrea 2017-01-04T20:14:36.001281Z

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

richiardiandrea 2017-01-04T20:14:48.001282Z

and that level was called profile

2017-01-04T20:15:12.001283Z

yes, this will be easy to do

richiardiandrea 2017-01-04T20:15:37.001284Z

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

richiardiandrea 2017-01-04T20:15:52.001285Z

the levels are hardcoded now

richiardiandrea 2017-01-04T20:15:58.001286Z

did not have time for a patch

2017-01-04T20:19:32.001287Z

you are right, log levels seem to be hardcoded there

đź‘Ť 1