Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 Printf Like Functionality

Release_1.3.6
closed
nobody
Other (7)
5
2012-09-14
2005-10-15
Alex Fabijanic
No

I'd like to see the above in PoCo.

Something along the line with Alexandrescu's SafeFormat
(http://erdani.org/code/SafeFormat.zip) would do the job.

The main reason I'd like to have it is because I have
to do this all the time:

int i = 1;
std::ostringstream s;
s << "some log string and number " << i;
logger().info(s.str());

and I'd obviously like to do something like this (but safe)

int i = 1;
logger().info("some log string and number %d", i);

or in SafeFormat fashion:

logger().info("some log string and number %d")( i );

So, anyway, if it deserves to be put on the list of new
features, I'll be thankful.

Discussion

  • Logged In: YES
    user_id=1148207

    coming in 1.2!

     
  • Logged In: YES
    user_id=1148207

    it's in 1.2