I guess it could be useful to add own stream operators in basic_record_ostream. Template forward to base + manips, just to keep record_ostream reference through streaming sequence.
This would allow to write stream based direct log record modifiers, i.e. attribute assignment:
record_ostream&operator<<(record_ostream&os,constadd_very_special_attribute&attr){log_recordrec=os.get_record();// add get_record_no_flush()?// add some very special attributerec.attribute_values().insert(...);returnos;}...LOG<<"AAA"<<add_very_special_attribute(...);
Though... now it can be done with upcast from basic_formatting_ostream.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I guess it could be useful to add own stream operators in basic_record_ostream. Template forward to base + manips, just to keep record_ostream reference through streaming sequence.
This would allow to write stream based direct log record modifiers, i.e. attribute assignment:
Though... now it can be done with upcast from basic_formatting_ostream.
You can use the add_value manipulator, although it should be in the beginning of the streaming expression.
Anyway this doesn't lessen modification utility.
Apropos in case of add_value stream flush in get_record is also not obligatory.