AI logs prefix is too large

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
Cjkjvfnby
AI Contributor
Posts: 539
Joined: Tue Jun 24, 2014 9:55 pm

AI logs prefix is too large

#1 Post by Cjkjvfnby »

I feel uncomfortable when I open AI logs. The amount of space covered by the prefix is way too big.

With my font size (I like my font like my spam: enlarged), screen (23"), and some space for toolbars 100-120 chars is a comfortable number of items per line.

Here is a sample line of logs (short one)

Code: Select all

14:54:43.099883 {0x00001934} [debug] python : TechsListsAI.py:690 : Seems to be OK!
14:54:43.099883 {0x00001934} [debug] python : TechsListsAI.py:678 : Checking TechGroup1a: 
14:54:43.100884 {0x00001934} [debug] python : TechsListsAI.py:690 : Seems to be OK!
14:54:43.100884 {0x00001934} [debug] python : TechsListsAI.py:678 : Checking TechGroup1b: 
14:54:43.100884 {0x00001934} [debug] python : TechsListsAI.py:690 : Seems to be OK!
14:54:43.100884 {0x00001934} [debug] python : TechsListsAI.py:678 : Checking TechGroup1SparseA:
The last line is 94 char long and 67 of them is the prefix.

Maybe we could sacrifice the thread_id (( {0x00001934}) ) or just make it shorter?

At this point, I don't know how thread_id could be used in AI logs. Actually, I have dug into the source code to understand what does this number means.
https://github.com/freeorion/freeorion ... 3085abR323
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13586
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: AI logs prefix is too large

#2 Post by Geoff the Medio »

If you want to remove the thread ID from the logs originating in Python, I think that's fine...

User avatar
Cjkjvfnby
AI Contributor
Posts: 539
Joined: Tue Jun 24, 2014 9:55 pm

Re: AI logs prefix is too large

#3 Post by Cjkjvfnby »

Geoff the Medio wrote: Mon May 03, 2021 1:24 pm If you want to remove the thread ID from the logs originating in Python, I think that's fine...
In Python, we just redirect output to the C++ logs without any prefix. Looks like we have a single log config for all cases.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply