logger object
This method will write the data accumulated internally for the log to a text file.
bool write(string filename, bool reset_text)
Parameters:
filename
The name of the file to write to.
reset_text
A boolean value specifying whether the log should be reset. If set to false, the text will remain in the log until you manually call the reset method.
Return value:
true on success, false on failure.
Remarks:
If an error occurs, no file will be written to and the text will remain in the log, regardless of the value of the reset_text parameter.
If the always_include_header property is set to true and the header_text property contains some text, the header will be written to the log every time the write method is called. Otherwise the header will only be written if there is no text already in the specified file.
The footer will only be included in the log if the reset_text parameter is set to true.
Example:

    //add some text to a log.

    #include "logger.bgt"

    log test;

    void main()
    {
    test.add_entry("text1");
    test.write("test.log", true);
    }