I want to write a mini logger in c++ and I want to implement something like this:
logger(log_level)<<"Aditional message"<<maybe an integer<<maybe a string<<etc;
and this needs to be able to write something like this: "date app_name user error_level Aditional_message" in a file. I know that i need to overload the operators () and <<. I Think that logger() should return a reference to the object itself, but i don't know how to overload << in order to achive what i want. Should i return a string and in the definition to do something like appendig? I hope I wasn't too vague.