Understanding << and pstr() in serial I/O

I am trying to understand some of the example programs and I don't understand lines like this:

cout << pstr("Logging to: ") << name << endl;

The Arduino Language Reference web page only shows << only used as a bit shift, which is clearly not the case in this program line.
I guess the line is directing output to some sort of serial port that was created with this line:

ArduinoOutStream cout(Serial);

There are also these lines which almost make sense, but not quite.
obufstream bout(buf, sizeof(buf));
bout << pstr("millis");

I don't understand if cout goes straight to the port and bout goes to a buffer which somehow eventually also goes to the port?
I don't see any description of a function psrt(). Is there any Arduino language reference that describes how this works and how I can adapt it to my needs?

These lines are from the SdFat example AnalogLogger.

Is there a language reference document that explains this stuff better than Arduino - Home ?

I downloaded ARDUINO_NOTEBOOKv6.pdf with the arduiino programming notebook by Brian W. Evans, but it is from 2008 and has none of this.

That construct is part of the C++ language. Google will find you any number of webpages which explain it.

Pete

SherpaDoug:

 cout << pstr("Logging to: ") << name << endl;

As Delta_G mentioned, the pstr() is a macro that places the string constant in PROGMEM. You don't need that for this small example, and I would suggest trying it without.

Strings stored in PROGMEM require special code to deal with, and I am unsure if << handles it properly. My guess is not.