Documention for: vprint.r
Created by: btiffin
on: 6-May-2007
Format: html
Downloaded on: 26-Jul-2024

Usage document for %vprint.r

1. Introduction to verbose logging control
2. vprint At a Glance
3. Using %vprint.r
3.1. Utility word list
4. Some advanced features
5. Credits

1. Introduction to verbose logging control

This library script is for inclusion in other programs and allows sophisticated logging and program debugging through use of a virtual console concept.

Please note. This document is a work in progress. There are advanced features that need usage examples. This is posted early to make REBOL users aware of this powerful logging utility. 06-May-2007

2. vprint At a Glance

 >> von/tags [one]
 == none
 >> vprint/tags "This gets displayed, the tagging symbol matches" [one]
 This gets displayed, the tagging symbol matches
 == none
 >> vprint/tags "This isn't displayed, the tagging does not match current logging tag" [two]
 == none
 

The v in vprint, may be thought of as both verbose and virtual.

3. Using %vprint.r

Including these tools is simple. Just DO it.

 >>do %vprint.r
 

or to execute this right out of the rebol.org library

 >>do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=vprint.r
 

3.1. Utility word list

You now have access to the following virtual console control and output utilities:
von Turn on verbosity /tags tags and /log tags
voff Turn off verbosity /tags tags and /log tags
vin txt Indents starting with txt and a literal [ /always /error and /tags tags
vout ends indented verbose output with a literal ] /always /error /tags tags and /return data
vprint verbose print with newline /in /out /always /error and /tags tags
vprin verbose print without newline /in /out /always /error and /tags tags
vprobe verbose probe /in /out /always /error /tags tags and /part amount
v?? name verbose display of variable name with molded value /always /error /tags tags
vlogclear blanks out current verbose logfile
vflush flushes current verbose printing to current log file accepts /disk file
 >> help vprint
 USAGE:
     VPRINT data /in /out /error /always /tags ftags

 DESCRIPTION:
      verbose print
      VPRINT is a function value.

 ARGUMENTS:
      data -- (Type: any)

 REFINEMENTS:
      /in -- indents after printing
      /out -- un indents before printing. Use none so that nothing is printed
      /error -- like always, but adds stack trace
      /always -- always print, even if verbose is off
      /tags
          ftags -- only effective if one of the specified tags exist in vtags (Type: any)
 

4. Some advanced features

This section will be updated. Two quick notes.

5. Credits

%vprint.r Original author: Maxim Olivier-Adlhoch