Logging. Log has to be activated in your program (nothing in the Castle Game Engine activates it automatically) by InitializeLog. Various units of the engine print some logging info when Log is true.
If you leave ALogStream as Nil (default), then we will prints log messages to StdOut, not to some external file. This is most useful and common behavior on Unixes, where most programs log to StdOut, and StdOut is always available. It also removes any problems with users asking "where can I find the log file?". The downside is that Windows users have to explicitly redirect StdOut of the GUI program to get the log, i.e. run your program from command-line like "program.exe > log.txt". Otherwise, GUI programs (with apptype GUI) do not have StdOut available under Windows.
Log message. Ignored when log is not initialized (Log is False).
Although we check Log here, you can also check it yourself before even calling this procedure. This way you can avoid spending time on constructing LogMessage.