Module Sundials.Logfile

module Logfile: sig .. end

A rudimentary interface to C streams for logging in Sundials.

Files for error and diagnostic information. File values are passed to functions like Cvode.set_error_file and Kinsol.set_info_file to log solver errors and diagnostics.

type t = Logfile.t 

An open log file.

val stderr : t

The stderr file.

val stdout : t

The stdout file.

val openfile : ?trunc:bool -> string -> t

Opens the named file. When trunc is false, the default, writes are appended to the file. When trunc is true, the opened file is truncated to zero length. Files are closed on garbage collection.

val output_string : t -> string -> unit

Writes the given string to an open log file.

val output_bytes : t -> bytes -> unit

Writes the given byte sequence to an open log file.

val flush : t -> unit

Flushes the given file.

val close : t -> unit

Closes the given file.