FreeOrion

Forums for the FreeOrion project
It is currently Mon Jul 23, 2018 5:33 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Improve logging format.
PostPosted: Sun Jul 01, 2018 11:55 am 
Offline
AI Contributor
User avatar

Joined: Tue Jun 24, 2014 9:55 pm
Posts: 448
I want to raise my problem about logs. Technical information is taking too much place in it.

Code:
03:20:08.797923 [debug] python : MoveUtilsAI.py:74 - Found valid path: path_information(distance=118.954092775184, fuel=4.0, path=(903, 843))
03:20:08.797923 [debug] python : MoveUtilsAI.py:59 - Requesting path for fleet F_1011<Scout Fleet> from S_903<Elased β> to S_828<Elased γ>
03:20:08.798923 [debug] python : MoveUtilsAI.py:74 - Found valid path: path_information(distance=91.80438210808126, fuel=4.0, path=(903, 828))
03:20:08.798923 [debug] python : MoveUtilsAI.py:59 - Requesting path for fleet F_1011<Scout Fleet> from S_903<Elased β> to S_288<>
03:20:08.798923 [debug] python : MoveUtilsAI.py:74 - Found valid path: path_information(distance=110.53160699667686, fuel=4.0, path=(903, 288))
03:20:08.798923 [debug] python : MoveUtilsAI.py:59 - Requesting path for fleet F_1011<Scout Fleet> from S_903<Elased β> to S_843<>
03:20:08.798923 [debug] python : MoveUtilsAI.py:74 - Found valid path: path_information(distance=118.954092775184, fuel=4.0, path=(903, 843))
03:20:08.798923 [debug] python : ExplorationAI.py:115 - Remaining options: [(1, 1011, 288), (1, 1011, 828), (1, 1011, 843), (1, 1017, 288), (1, 1017, 828), (1, 1017, 843)]
03:20:08.799923 [info] python : ExplorationAI.py:119 - Sending fleet 1011 to explore S_288<>


Image how much of the useful text fits 23" screen with comfort font size for me is in attachment.

I see next ways to make technical info shorter:
  • Use milliseconds instead of microseconds.
    Code:
    03:20:08.797923 [debug] python : MoveUtilsAI.py:74 -
    03:20:08.797 [debug] python : MoveUtilsAI.py:74 -
  • Remove some separators.
    Code:
    03:20:08.797923 [debug] python : MoveUtilsAI.py:74 -
    03:20:08.797923[debug]python MoveUtilsAI.py:74
  • Remove `channel_name` or make it optional. In quick look it almost always duplicates filename. For python it is too broad.
    Code:
    03:20:08.798923 [debug] python : MoveUtilsAI.py:59
    03:20:08.798923 [debug] MoveUtilsAI.py:59
Result:
Code:
03:20:08.797923 [debug] python : MoveUtilsAI.py:74 - Found valid path: path_information(distance=118.954092775184, fuel=4.0, path=(903, 843))
03:20:08.797[debug] MoveUtilsAI.py:74 Found valid path: path_information(distance=118.954092775184, fuel=4.0, path=(903, 843))


Attachments:
File comment: Sublime text 3, 1920*1080, 23" comfort size
logs_small.png
logs_small.png [ 198.27 KiB | Viewed 93 times ]

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group