mirror / dolphin-emu

ARCHIVED Moved to *dolphin-emu/dolphin*
https://github.com/dolphin-emu/dolphin
14 stars 14 forks source link

Adding option to log without file or type #5

Open john-peterson opened 11 years ago

john-peterson commented 11 years ago

Adding option to log without file or type

Problem

When printing

the file and type prefix

this example show

10:34:860 Src\HW\WiimoteReal\WiimoteReal.cpp:379 N[Wiimote]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10:34:861 Src\HW\WiimoteReal\WiimoteReal.cpp:79 N[Wiimote]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

This is a problem because

Adding a log without file prefix, that print this instead of the above

10:34:860 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10:34:861 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Function name

The log name is

because

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

[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

[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

[16:32] @Sonicadvance1 I think that is called printf

The problem with printf is

john-peterson commented 11 years ago

Adding log colors

Commit message

because