This is kind of a philosophical question.
Basically people often ask if I am logging - and since I am not a full time programmer, but someone who programs often but is actually more of a requirements analyst, I don't know all the best practices.
I use Java a lot so I often do things like
System.out.println()
What's the difference in theory between the two? Ultimately aren't I also logging? Esp, if I prefix my comments with something like "ERROR:" or "WARN:" ?
Logging is an abstract way of printing to console. Using proper logging framework you specify what information you want to log and what is the importance of it. The configuration of a logging framework then decides whether:
/dev/null
I'd say printing on console is a primitive way of logging. Certainly it helps in some situations but it is not very flexible and for sure is not suitable for servers.
Logging is when you're writing to files for future analysis.
Printing to the console is... well it's just printing to the console!!!
In my opinion they're not interchangeable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With