#48005: How to activate UNIT_LOG, or CITY_LOG ? Open Date: 2023-05-09 18:22 Last Update: 2023-05-11 12:58 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/48005 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48005 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-05-11 12:58 Updated by: alain_bkr Comment: 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. --------------------------------------------------------------------- Ticket Status: Reporter: alain_bkr Owner: (None) Type: Support Request Status: Open Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: 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, -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/48005 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48005