home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / logger.zip / logger.doc next >
Text File  |  1996-04-06  |  4KB  |  134 lines

  1. **********************************************************************
  2.  
  3.   Logger
  4.   ======
  5.  
  6.   A simple, WPS aware, utility for logging events.
  7.  
  8.   (C) Copyright Bjorn Fahller 1996.
  9.  
  10. **********************************************************************
  11.  
  12. WPS aware in what sense? 
  13.  
  14.              A log folder will be created on your desktop. This is
  15.              where logs will be written. If you move or rename the
  16.              folder, the logs will still get to the right place.
  17.              The log folder can be opened by the logger utility,
  18.              regardless of where the log folder resides.
  19.  
  20.  
  21. **********************************************************************
  22.  
  23. Usage:
  24. ======
  25.  
  26. logger wr name "a message"
  27.  
  28.              Append the string "a message" (without the quotes) to the
  29.              file named "name" in the log folder. If no file named
  30.              "name" exists in the log folder, it will be created.
  31.              Useful for reporting unexpected, odd, bad or unwanted,
  32.              results in night-time REXX scripts.
  33.  
  34. logger wrp name
  35.  
  36.              Append from stdin to the file named "name" in the log
  37.              folder. If no file named "name" exists in the log folder,
  38.              it will be created. This is useful for "piping" info
  39.              to a log.
  40.  
  41.              Example:
  42.                dir c: | logger wrp dirc
  43.  
  44.                Will create a file named "dirc" in the log folder.
  45.                The content of "dirc" will be the output of "dir c:"
  46.  
  47. logger oc
  48.  
  49.              Open the log folder if, and only if, there are files in
  50.              it.
  51.  
  52.  
  53. Example:
  54.  
  55. A small script to scan your local hard drives for viruses. If a
  56. virus is found, the output of the virus scanner is logged to
  57. a file named "virus".
  58.  
  59. /* rexx script to scan for viruses */
  60.  
  61. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  62. call SysLoadFuncs
  63.  
  64. tmp=value('TMP',,'OS2ENVIRONMENT');
  65. name=SysTempFileName(tmp'\scan???.rep');
  66.  
  67. '@os2scan.exe /adl /nobeep /noexpire /report' name '/rptcor /rpterr'
  68. if rc \= 0 then
  69.   'mylog wrp virus <' name
  70.  
  71. 'del' name
  72. exit
  73.  
  74. /* end of rexx script */
  75.  
  76. Use ExCal, cron, or some other timer utility to start this script at
  77. night time, or when you're at work.
  78.  
  79. Then, early in the morning, or in the afternoon, have "logger oc"
  80. started for you to open the log folder if there is anything
  81. there.
  82.  
  83.  
  84. **********************************************************************
  85.  
  86. Registration:
  87. =============
  88.  
  89. None. There is no such thing for this program. If you like it,
  90. tell others, and tell me. If you have ideas for enhancements,
  91. tell me. If you like it very much indeed, send me a post card.
  92. As a matter of fact, send me a post card anyway :-)
  93. See "Contacting the Author" below for the address.
  94.  
  95.  
  96. **********************************************************************
  97.  
  98. License agreement:
  99. ==================
  100.  
  101. Logger, the executable (logger.exe) and this file (logger.doc) is
  102. the copyrighted property of Bjorn Fahller.
  103.  
  104. - You may use this software, for free, as much as you please, 
  105. - You may copy and redistribute this software, as long as the
  106.   recipient receives logger.zip unchanged, and there is no cost
  107.   to the recipient, other than the cost of providing media and
  108.   transmission.
  109. - You may redistribute this software under other conditions than
  110.   those above if, and only if, you have a personal agreement with
  111.   Bjorn Fahller, to do so (See "Contacting the Author" below.)
  112.  
  113. THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, OF ANY KIND.
  114. BJORN FAHLLER SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING OUT OF
  115. YOUR USE, OR INABILITY TO USE, OR ABUSE, OF THIS PROGRAM, EVEN IF
  116. ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BY YOUR USE OF THE
  117. PROGRAM YOU AGREE TO THE TERMS OF THIS LICENSE.
  118.  
  119.  
  120. **********************************************************************
  121.  
  122. Contacting the Author:
  123. ======================
  124.  
  125. e-mail:     bjorn@algonet.se
  126. Phone:      +46 8 918297 (evenings, CET)
  127. Fax:        +46 8 918297 (daytime, workdays, CET)
  128. Snail-mail: Bjorn Fahller
  129.             Siljansvagen 35
  130.             S-120 55 Arsta
  131.             SWEDEN
  132.  
  133.  
  134.