Fork me on GitHub
#babashka
<
2021-07-08
>
bherrmann16:07:53

Humm... can babaska access jackson's ObjectMapper ? I want to fiddle with some JSON, and json's maps are ordered by default... So I'd like to fiddle with the JSON as json, not mapped to edn.

borkdude17:07:12

Could you show me the interop code?

borkdude19:07:02

If babashka would adopt a logging library from the clojure ecosystem, what should it be? taoensso.timbre, clojure.tools.logging + some Java one, or timbre as the clojure.tools.logging implementation? Other ideas? Nothing would also be an option

mkvlr20:07:34

it’s built on slf4j, not sure if that’s useable in native image

isak20:07:46

Same, I think that one is best ^

ribelo20:07:41

timbre ❤️

isak20:07:08

It is so good someone basically ported it to the browser: https://github.com/lambdaisland/glogi (This one is inspired by pedestal.log, as you see in the readme)

wilkerlucio20:07:21

whatever it is, would be nice to be something with Clj and CLJS support, so we could keep portable code

☝️ 2
🙌 2
borkdude20:07:48

I agree. The point is mostly portability. Some projects run into a dependency on clojure.tools.logging which makes it unusable with bb as is.

mike_ananev21:07:52

I vote for pedestal.log

littleli11:07:52

@U04V15CAJ can clojure.tools.logging be adapted/shimmed?

borkdude13:07:42

@UBLU3FQRZ Think so, what kind of shim are you thinking about?

littleli13:07:26

My opinion is that you don't want to pollute bb with some platform specific logging. Unix philosophy was always write error to stderr and have no output on success/or output if there is any on stdout. But what is (probably) possible is to shim some api (like clojure.tools.logging) with just a script and that could be it.

borkdude13:07:25

yes, you can provide clojure.tools.logging as an API and just provide a very basic implementation

👍 4
lukasz14:07:57

My vote is on clojure.tools.logging - or something that looks like it

borkdude14:07:06

yes, the most important issue isn't the logging itself, but making projects which use it, compatible with bb

borkdude14:07:56

we could provide our own very basic implementation under the tools.logging API, but I'm not sure if people would like to disable logging based on namespace, etc, and before you know it, you're re-implementing something that already exists

lukasz14:07:21

Agreed, also there's things like logging being threadsafe as opposed to a naive approach of just using print* etc etc

borkdude18:07:14

perhaps clojure.tools.logging as the abstract logger + timbre as the concrete logger (exposing a subset of timbre initially)

👍 7
onetom05:07:38

im surprised that µlog hasn't come up yet: https://github.com/BrunoBonacci/mulog worth watching the related video

borkdude06:07:10

Mulog has come up and has been mentioned in the discussion on Github. Bruno explained why it isn’t such a good fit for bb

👍 3
onetom11:07:40

i actually wrote that message a lot earlier but since i switched my slack to send message with cmd-enter, i miss sending them when i write them... also, the related github discussion is folded by default, so when i searched for mulog or bruno, i got no results :/ (im just saying, so others are aware of these usability traps too)