1

What do you write as a test log? To make sure code is reaching to a particular line?

I generally prefer "=============="
And "This is not the end".

Comments
  • 2
    A number of candidates:
    A
    Here
    B
    1
    AAAAAAAAAAAAAAAAAAAAAA
    Test
    test
    ###
  • 1
    "fuckthisshit"
  • 3
    Sometimes it is “iwkfkcoeowijxiciebe” and sometimes it is “uwuwjdjcigor” but there are times I use “owlekfogovasgsvdac”
  • 4
    @codepotato your second to last, UwU * notices bug * what's this
  • 0
    Depending on my mood, it's either animal noises:
    Quack, Honk, Meow, Woof, Ribbit, Burp
    Machine noises:
    Clank, Screech, Click, Beep, Boop, Ping, Pong, Tick, Tock
    Swear words with an increasing number of vowels.
    I always make sure to capitalize the message and terminate it with a period, exclamation mark or question mark, so I'm less likely to miss them in case I forget a line break.
  • 2
    logger.debug("Will attempt to create a DB record");
    someRepo.save(entity);
    logger.debug("DB record created. Moving on...")

    I prefer smth sensible, so that I don't have to look at the code when analysing logs to see wtf does that "Hit the spot" mean
  • 1
    @netikras Yeah, these are only good for one debugging session. If you plan to use them for a longer period it's definitely better to write something sensible.
  • 2
    "\n\nFUCK YOU\n\n"
  • 1
    I'll be honest. Most of us write some derivative of Fuck
  • 2
    since when i do these kinds of logs, it's multiple of them in one go to cover all the possible paths that the code could go into, so i do "in [function name] before [what is supposed to happen next]"
  • 2
    @MagicSowap "fuck you" ones are the last step of desperation when i zero in on the one specific piece of one specific code path that i explicitly need to be executing in that specific moment, and it's not =D
Add Comment