Using boost::format for DebugLogger messages and other logs

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

Moderator: Committer

Post Reply

Should

Yes
0
No votes
No
0
No votes
 
Total votes: 0

Message
Author
AndyMender
Space Krill
Posts: 1
Joined: Mon Aug 08, 2022 7:36 pm

Using boost::format for DebugLogger messages and other logs

#1 Post by AndyMender »

First, I would like to say "hi" as this is my first post on the forums. I really liked Master of Orion and got super hooked on FreeOrion recently. Therefore, I decided to help out the project.

As I am primarily a Python developer I like the way f-strings and string templates emphasize what the final shape of the string/message/log would be. In C++ this can be achieved in several ways, one of which (boost::format) is used already in the localization code in FreeOrion.

I was wondering whether developers of FreeOrion would be interested in seeing it in other places like the many uses of DebugLogger in CombatSystem: https://github.com/freeorion/freeorion/ ... m.cpp#L244
Here is the related GitHub issue I opened: https://github.com/freeorion/freeorion/issues/4047
I personally don't have a strong opinion either for or against, but I would be interested in tackling it as it would give me a broad overview of the code base.

What are your thoughts?

User avatar
Vezzra
Release Manager, Design
Posts: 6090
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Using boost::format for DebugLogger messages and other logs

#2 Post by Vezzra »

A belated welcome from my side :D

Regarding your question, I don't have a preference, but I'm not doing coding stuff. That's something our C++ coders need to weigh in on... anyone? Not much feedback yet...

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

Re: Using boost::format for DebugLogger messages and other logs

#3 Post by Geoff the Medio »

I doubt there's enough people donig string formatting in FreeOrion C++ code to have a useful poll result.

Post Reply