the color number 1, 2, 3, 4, 5 is easier to remember than N, W, E, I, D
Punctuation
The punctuation is changed from
12:35:014 Src\File.cpp:350 N[COMMON]: test 1
to
12:35:014 Src\File.cpp:350 N[COMMON] test 1
because
that use less horisontal space
the colon separator isn't meaningful to indicate where the log message start because it can be inferred from the format of the log
Log selection
[15:19] <_skidau> yeh, i think the log file name is quite redundant, but other people like it, so don't merge the patch
It doesn't alter the current log f.e. WARN_LOG, it adds f.e. a WARN_LOG_S
[15:29] <_skidau> hmm.. i don't like it, sorry :P
Describe the reason for that
[15:34] <_skidau> the confusion of "why are there two ways to log"
Because
non-text data is more efficient to print without a file and type prefix because row length and fixed indentation length matters
some logging is temporary in the sense that it's removed when a problem is solved
for this logging it's valuable to grant different preferences regarding file and type prefix
Identify log origin
[15:45] @Sonicadvance1 And then on that point. If they are left in the source and they accumulate, it can very well turn in to a clusterfuck of "Where are these messages coming from?"
When committing a log without file prefix it's appropriate to prepend it with a log that describe the source of f.e. the following hex dump because it would otherwise have little meaning for the reader
Value
[16:15] @Sonicadvance1 This seems to be a very specific change that will be used in just a singular location
[16:15] @Sonicadvance1 eg, You debugging wiimote dumps
Hex dumps are important for emulation and reverse engineering and the emulator should have
a log function without a file and type prefix
a hex dump function that print a C array (i.o.w. the output format of xxd -i)
[16:32] @Sonicadvance1 I think that is called printf
Adding option to log without file or type
Problem
When printing
the file and type prefix
this example show
This is a problem because
Solution
Adding a log without file prefix, that print this instead of the above
Function name
The log name is
because
Punctuation
The punctuation is changed from
to
because
Log selection
It doesn't alter the current log f.e.
WARN_LOG
, it adds f.e. aWARN_LOG_S
Describe the reason for that
Because
Identify log origin
When committing a log without file prefix it's appropriate to prepend it with a log that describe the source of f.e. the following hex dump because it would otherwise have little meaning for the reader
Value
Hex dumps are important for emulation and reverse engineering and the emulator should have
xxd -i
)The problem with
printf
is