These are various ways of supporting prefixed logs while preserving line numbers and allowing custom additions to the format string.
The importance of the custom format string is that if you wanted to do custom css, using a plain console.log.bind()
wouldn't work,
since you need %c
to apply css, and that must occur in the first parameter.
// plaintext
console.log.bind("%cwarn%c >", "color: yellow", "")("something")
// trying to use a format string in the bound method doesn't work
console.log.bind("%cwarn%c >", "color: yellow", "")("%c%s", "color: red", "RED!")
// appending the format string to the first argument does