load-journalJournalingmake-journal-streamerGoTo Top

make-journal-streamer   pathname &key external-format package read-default-float-format value => journal-streamer[Function]

Purpose
Create a journal streamer to record to a file changes made to unit instances (and space instances).

Package   :gbbopen

Module   :streaming

Arguments and values

pathname     A pathname designator
external-format     An external-file-format designator (default is :default)
package     A package designator indicating the package to be used when writing the journal and when loading the journal file (default is :common-lisp)
read-default-float-format     One of the atomic type specifiers short-float, single-float, double-float, or long-float to be used when writing the journal and loading the journal file (default is single-float)
value     An object to be saved with the journal and returned when the journal file is loaded (default is nil)
journal-streamer     A journal streamer

Returns
The created journal streamer.

Description
If pathname does not specify a file type, the type jnl is added to it. Then, (user-homedir-pathname) is used to supply any missing components to pathname.

The size of the journal file can be reduced by specifying a package containing the majority of the symbols that are written to the file.

A with-saving/sending-block, with the package and read-default-float-format values, is established when writing to the journal.

See also
    load-journal
    omitted-slots-for-saving/sending
    stream-instance
    save-blackboard-repository
    with-saving/sending-block

Example
Load the :streaming module followed by the GBBopen Tutorial Example application (without running it). Then write a journal file recording what occurred when taking a walk:

  > :streaming
     ...
  > :tutorial-example :noautorun
     ...
  > (defparameter *streamer*
      (make-journal-streamer "tutorial" :package ':tutorial))
  *streamer*
  > *streamer*
  #<journal-streamer "<homedir>/tutorial.jnl">
  > (add-mirroring *streamer* 'standard-space-instance)
  nil
  > (add-mirroring *streamer* 'path)
  nil
  > (add-mirroring *streamer* 'location)
  nil
  > (take-a-walk)
  ;; Control shell 1 started
     ...
  ;; Explicit :stop issued by KS print-walk-ks
  ;; Control shell 1 exited: 41 cycles completed
  ;; Run time: 0.01 seconds
  ;; Elapsed time: 0 seconds
  :stop
  >


The GBBopen Project


load-journalJournalingmake-journal-streamerGoTo Top