Example FileIO openLog 001

 

 

Description

The openLog function writes to a file the displayed strings on the console.

 

Details

By default, the logs are appended to myLogfile.txt if it is already existing. Also, timestamps are included for each line

(openLog "myLogfile.txt") Returns: true

The "Hello World" displayed on the console is written to "myLogfile.txt"

(writeln "Hello World") Returns: HelloWorld

Close the log file "myLogfile.txt"

(closeLog) Returns: true

Open log file "myLogfile.txt" and clear its previous contents. Timestamps are not included for each line to be logged.

(openLog "myLogfile.txt" clear: notiming:) Returns: true

The "Hello World" displayed on the console is written to "myLogfile.txt" without the timestamp

(writeln "Hello World") Returns: HelloWorld

Close the log file "myLogfile.txt" with a note "Closing this log."

(closeLog "Closing this log.") Returns: true

 

Related Examples

Here are examples of the openLog function at work.

FileIO openLog 001

 

Function Links

Here is the link to the current function used in this example.

openLog

Here are a number of links to other related functions.

closeLog(#void)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

FileIO

Here are a number of links to examples having similar argument types.

FileIO display 001 FileIO openLog 001

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE