チケット #48005

How to activate UNIT_LOG, or CITY_LOG ?

登録: 2023-05-10 01:22 最終更新: 2023-05-11 21:21

報告者:
担当者:
(未割り当て)
チケットの種類:
状況:
オープン
コンポーネント:
マイルストーン:
(未割り当て)
優先度:
5 - 中
重要度:
5 - 中
解決法:
なし
ファイル:
なし

詳細

I did configure with -enable-debug options, but this is not enough for all specific logs. What must i do to have this ?

      UNIT_LOG(LOG_DEBUG, punit,
                 "%d itself acted due to displacement recursion. "
                 "Was going from (%d, %d) to (%d, %d). "
                 "Now heading from (%d, %d) to (%d, %d).",
                 punit->id,

チケットの履歴 (4 件中 3 件表示)

2023-05-10 01:22 更新者: alain_bkr
  • 新しいチケット "How to activate UNIT_LOG, or CITY_LOG ?" が作成されました
2023-05-11 19:58 更新者: alain_bkr
コメント

I checked the doc, and found nothing.

$ fgrep -i debug doc/* 2>/dev/null
doc/BUGS:   - If Freeciv "dumps core", then we may ask you to use a debugger to
doc/CodingStyle:- Always check compilation with the configure option --enable-debug set.
doc/FAQ:   This will help you get some debug information, which might give a clue
doc/HACKING:The autogame mode with timeout -1 is only available in DEBUG versions
doc/HACKING:log levels (log_fatal(), log_error(), log_verbose(), log_debug()) should
doc/HACKING:Debugging and Profiling
doc/HACKING:Debugging has to be activated on compile time. For autotools based builds
doc/HACKING:that's done by adding the option '--enable-debug=no/some/yes/checks'
doc/HACKING:to the configure script. See m4/debug.m4 for exact compiler flags each
doc/HACKING:  no:     no debugging enabled(FREECIV_NDEBUG and NDEBUG are defined)
doc/HACKING:  some:   default build (neither FREECIV_NDEBUG nor FREECIV_DEBUG is defined)
doc/HACKING:  yes:    debugging enable (FREECIV_DEBUG is defined)
doc/HACKING:          debugging log level available (4, log_debug())
doc/HACKING:          more compiler warning flags than with lower debug levels
doc/INSTALL.meson:debug (boolean):
doc/INSTALL.meson:  Whether debug version of Freeciv should be built. While this is generic
doc/Makefile.in:	$(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/emscripten.m4 \
doc/README:"warning", "normal", "verbose", and in debug builds "debug".
doc/README:You can change the level of log messages displayed with "--debug
doc/README:If you compiled with FREECIV_DEBUG defined (an easy way to do this is to
doc/README:configure with --enable-debug), then you can get debug level messages
doc/README:by setting the level to "debug" (or 5). Also, it is possible to
doc/README:control debug level messages (but not other messages) on a per-file
doc/README:and per-line basis. To do this use "--debug debug:str1:str2" (as many
doc/README:match those strings as a substring will have debug log messages
doc/README:turned on, and all other debug messages will be suppressed.
doc/README:To control lines, use: "--debug debug:str1,min,max" and for files which
doc/README:match str1 only debug messages within the specified minimum and maximum
doc/README:  |  % freeciv-gtk3.22 --debug fatal
doc/README:  |  % freeciv-server -d debug:log:civserver,120,500:autoattack
doc/README:server, and debug level messages for some specified modules. Note
doc/README:"civserver.c", debug messages between lines 120 and 500 will be
doc/README:FREECIV_DEBUG.
doc/README.AI:hell to debug but means that small bugs don't affect overall picture
doc/README.AI_modules:unless one has configured with --enable-debug which allows freeciv

I'll write some documentation if needed, or add a link to relevant place, but i need a clue to start.

2023-05-11 19:59 更新者: alain_bkr
  • コンポーネント(未割り当て) から Documentation に更新されました
  • チケットの種類サポートリクエスト から バグ に更新されました
2023-05-11 21:21 更新者: cazfi
コメント

It's a macro defined in server/srv_log.h . There's bunch of macros defining the log levels it produces near the top of the file.

添付ファイルリスト

添付ファイルはありません

編集

このチケットにコメントを追加するには、ログインが必要です » ログインする