Hi I want to create a logging mechanism which I can use like std iostreams, with << >> operators and pass Log levels probably using some functions?

How do I go about doing this? Because I want to use this data passed and send it over a socket, so that a logging client can connected to the app and start downloading the log.

Can someone please give me some hints for this and how do I go about creating my own stream?

And for something like this do you prefer std streams format or function call?

Thanks
Ankur