Skip to main content

Timeline for Simple Logger in C++

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Oct 21, 2020 at 8:54 vote accept coolmouse21
Oct 21, 2020 at 3:00 history tweeted twitter.com/StackCodeReview/status/1318749045377171458
Oct 20, 2020 at 22:22 comment added Brendan Wilson Sinks are objects that encapsulate some behavior for handling a logged message. The logger itself doesn't have any notion of whether the message is going to stdout, a file, a database, or whatever, it just has a bunch of sinks that it hands the messages off to. The sinks do the work of actually outputting the message somewhere.
Oct 20, 2020 at 21:49 answer added mkamerath timeline score: 4
Oct 20, 2020 at 21:17 comment added spiridon_the_sun_rotator Some minor suggestions - 1) if the strings may be heavy, better pass them by const reference const std::string& to avoid copy 2) add the constructor, which call configure function
Oct 20, 2020 at 20:50 comment added coolmouse21 I will look at loguru, thanks. But as I said, I made this library for myself. I only added the features that I would likely need. And by the way, I couldn't find anything about "Log-Sinks". The only thing I saw on google were literally "log sinks". Anyway, I like your suggestions like the logging level. Thank you.
Oct 20, 2020 at 20:38 comment added Loki Astari One of the biggest things about a logging system is being able to enable/disable or set logging level (so less import stuff is not logged). I don't see any of that. Also the concept of log sinks does not seem to exist so you can either log to cout or a file. what about syslog?
Oct 20, 2020 at 20:35 comment added Loki Astari Have a look at github.com/emilk/loguru
Oct 20, 2020 at 20:19 comment added coolmouse21 Well actually it was the learning experience as well as the complexity of other solutions, I would never understand something fully until I write it myself. And to be honest: it's also quite fun to code. I haven't actually set any goals, I'm just currently looking for optimizations.
Oct 20, 2020 at 20:06 comment added G. Sliepen Can you describe what was unsatisfactory with the other solutions, and what requirements you have set for your logger?
Oct 20, 2020 at 19:56 review First posts
Oct 20, 2020 at 21:25
Oct 20, 2020 at 19:53 comment added coolmouse21 By the way, sorry if my question isn't perfect. I'm completely new to StackExchange. :)
Oct 20, 2020 at 19:52 history asked coolmouse21 CC BY-SA 4.0