Author Topic: 120.2.3 Nightly Linux pak192.comic.0.4.1 - debug level 5 disables debug messages  (Read 1060 times)

0 Members and 1 Guest are viewing this topic.

Offline userfriendly

Not sure if this is a bug, but the help output of sim -h indicates the debug can be between 1 and 5 and setting it to 5 doesn't actually print debug messages.
Execution arguments are:
Code: [Select]
-async -debug 5 -use_hw -screensize 1200x700 -lang en -objects pak192.comic.0.4.1 -nosound -nomidi -load save1.sve.
Debug messages, such as
Code: [Select]
dbg->debug("tool_t::read_menu()", "creating %s", id);are not logged. Looking at    if(log_debug  &&  debuglevel==4) {, it seems only debug level 4 will allow printing.

Sorry if this has been reported or is not really a bug. Maybe it's just the help text or I didn't read some documentation?
Just be good to each other.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5053
  • Total likes: 249
  • Helpful: 113
  • Languages: EN, NO
The help text can perhaps be read that (1..5) is an open interval, meaning that 1 and 5 are themselves not included. I don't think that is intended, though. The code very much treats 1 as a valid log level. In fact, it even appears that 0 is a valid level.

Another oddity in the logging is that vmessage is not a variant of message, but of error, since it checks for debuglevel>0 not debuglevel>2

Offline userfriendly

The perhaps it's about consistency and clear help?
Just be good to each other.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8971
  • Total likes: 379
  • Helpful: 231
  • Languages: De,EN,JP
In r8410 the debug levels are now defined as intended, i.e. >=level. Currently there are level 0 (nothing) 1 (error) 2(error+warning) 3(error+warnings+messages) and 4 (all messages).