Author Topic: 120.2.3 Nightly Linux pak192.comic.0.4.1 - debug level 5 disables debug messages  (Read 238 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 log.cc:85:    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: 4972
  • Total likes: 230
  • Helpful: 111
  • 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.