Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
iAmNaN71316ylol In the last Century, I used to put printf() statements in my C code to debug. Yeah, fixed the bugs and deployed to prod... with the print statements still in the code.
>>>top of function x<<< -
@iAmNaN Sure, that might not be the ultimate desired outcome 😄
But all our logs get stripped out during the prod build (par of CD/CI)
So nothing gets logged in prod and if there's more work I need to add them back in... sounds like lose/lose situation 😔 -
I wonder if using a debugger instead is possible here. Maybe you can have a debug branch where you can cherry pick them back from if the need rises?
-
You need to have some sort of pre-commit hook to remove them. It shouldn't show up in the tree, unless the server has its own hook specifically for that which would be pointless...
-
@electrineer I was about to create a branch with logs if this thread convinces me logs should stay out of committed code base 😄 so far I'm still not convinced 🤫
-
@kleopi I was using the logger provided by SDK, all above the board and still I got shot down by a couple of my peers 🤕
-
And then there are us C/C++ folks who simply utilize the preprocessor to make debug log messages to only show up in debug builds...
(with file name and line number)
Honestly, I never realized before how complicated this is in other languages...
Related Rants
-
cdrice105"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!" ...
-
MoboTheHobo35My Friend: Dude our Linux Server is not working anymore! Me: What? What did you do? My friend: Nothing I swe...
-
tommy15Right now someone at Google is coding something useless for us to laugh at on April Fools.
To fix a bug I added a few log messages to trace what gets executed and in what order (very new to the project). Fixed the bug, pushed PR and the only comment was to remove the log files. 🤦♂️🤦♂️
Please tell me this is normal or should I start looking for a new place that hires "only the best" 😭
rant
pullrequest
logs
fml