I'm intercepting interrupts in my Go program and I'm trying to print out a log message when such thing happens, like that:
log.Printf("Ctrl+C pressed in Terminal")
The problem is, that this way the date part of log.Println is missing. When doing it without the carriage return, like that:
log.Printf("Ctrl+C pressed in Terminal")
then the date is being printed out, but it's being prepend by the ^C
string. Is there a way to supress the ^C
string output on the terminal and have the date in the log string at the same time?