TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

‘Woof’, a pure Scala 3 logging library

30 pointsby Ivoahover 3 years ago

8 comments

eklavyaover 3 years ago
I have done Scala for a long time, I had a chance encounter with Spring boot and reflections like no tomorrow style of programming. It was like a wake up call. I knew why I hated the complex juggernaut of the configs and magic but man do I hate to admit, how productive I was once all that was working. Sure someday it would not work and I would need to debug in my IDE but that was rare.<p>I have lived the life of somebody who wants to have every effect annotated, still on some level I believe maybe it can be achieved someday with ergonomics. I have done a lot of rust now and when I look back, I look differently at monads and those abstractions now. Maybe I felt smart using them.<p>There is some value in being able to just look at any library and being able to understand what and how. I have done this a lot in Rust. Scala has some amazing libs and I can&#x27;t deny that they were immensely powerful, it wasn&#x27;t easy to make sense of it all though, forget about tweaking and making changes easily.<p>All in all I have come to realise, there is no perfect paradigm, get work done. Use what makes sense. So stop fretting over dart&#x2F;go, don&#x27;t bemoan Kotlin, use Scala when you can and don&#x27;t worry about making everything a kliesli. And really I would not worry about my logger having a side effect. Effect systems still sound cool though, maybe someday.<p>Not worrying about programming languages and code golfing has made me a much better and productive developer, I think.
doikorover 3 years ago
There is also <a href="https:&#x2F;&#x2F;github.com&#x2F;valskalla&#x2F;odin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;valskalla&#x2F;odin</a> for a pure&#x2F;fp Scala logging library (also includes a slf4j bridge if you need to work with java stuff)<p>It also has some &quot;fancy&quot; features like changing log level if exception happens<p><a href="https:&#x2F;&#x2F;github.com&#x2F;valskalla&#x2F;odin#extras-conditional-logging" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;valskalla&#x2F;odin#extras-conditional-logging</a><p>Though we have not yet upgraded it to Scala 3 it should work with Scala 3 just fine. (We do compile a Scala 3 release of most of the stuff but the codebase itself is mostly Scala 2 for now)
esarbeover 3 years ago
This is very exciting; one more library making use of the amazing features that come with Scala 3.<p>It&#x27;s a beautiful and simple language, more so than Scala 2 and I cannot recommend it highly enough for many productive use-cases.
jancsikaover 3 years ago
Is it possible to inject code from arbitrary urls with this?
squid_demonover 3 years ago
Can someone please explain the purpose of a logging library (woof, log4j, etc)? There must be something beyond writing text to an external file, possibly with different error levels, that I&#x27;m missing. This is a serious question. I truly do not understand what you gain by depending on an external library for this (seemingly) simple operation and would appreciate some insight. Thanks!
评论 #29608161 未加载
评论 #29608135 未加载
评论 #29608595 未加载
sg47over 3 years ago
Does it have jndi support?
weegoover 3 years ago
Having been primarily a Scala dev for the last 12 years I feel like people have slowly lost their minds over what pragmatic FP in Scala should be.<p>People are willingly recreating the Java situation of &#x27;I don&#x27;t know the project yet but I know we need Spring!&#x27; with these ridiculous libraries from Haskell zealots for no obvious benefit.<p>The ergonomics of this lib out of the box are literally worse for no reason, and worse than most other existing logging libs, because of it
评论 #29607627 未加载
评论 #29607884 未加载
armchairhackerover 3 years ago
I&#x27;m sorry but I don&#x27;t understand <i>why</i>. It seems like this falls for the same kind of over-engineering which caused log4j&#x27;s issues in the first place.<p>&gt; Announcing Bark! A logging library written purely in C! Blazingly fast! 0 dependencies! It even prints file and line numbers!<p><pre><code> #ifdef DEBUG #define LOG(msg, ...) printf(&quot;[__FILE__ __LINE__]: &quot; msg, ...) #else #define LOG(msg, ...) #endif</code></pre>
评论 #29607591 未加载
评论 #29608562 未加载
评论 #29607000 未加载
评论 #29607409 未加载