Logging Functions

HFL Logging and Pause Functions

  • HFL has several logging functions that can help debug an HFL script, by outputting messages to the console, and also to a log file in '%TEMP%\hflc.log'.
  • Some of the functions can pause execution, allowing the user to use the Debugger and Inspector features.
  • pause (<string>)
    where:
    <string>
    :=
    a quoted text string
    • Prints a message to the console and to the log file, and then pauses execution.
  • pausef (<fmt-string>, <fmt-args>)
    where:
    <fmt-string>
    :=
    a quoted sprintf()-style format string
    <fmt-args>
    :=
    <fmt-arg> [, <fmt-arg>]*
    <fmt-arg>
    :=
    a value to be displayed
    • Formats a message using sprintf(), prints it to the console and to the log file, and then pauses execution.
  • alert (<string>)
    • Prints a 'banner' message to the console, then pauses execution.
    • A 'banner' message is one that is preceded and followed by line of asterisks in order to make the message stick out.
  • logNP (<log-level>, <pause-level>, <string>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <string>
    :=
    a quoted text string
    • Prints a message to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
    • The <log-level> argument is a signed integer that controls whether the message will be output or not. If it is a negative value, or is less than value in global variable $_LOG_LEVEL, the message will be output.
    • The <pause-level> argument is a signed integer that controls whether the compiler's interpreter will pause or not. If it is a negative value, or is less than value in global variable $_LOG_LEVEL, the program will pause.
  • logN (<log-level>, <string>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <string>
    :=
    a quoted text string
    • Prints a message to the console and to the log file, depending upon the value of its <log-level> argument.
  • logSN (<log-level>, <fmt-string>, <fmt-args>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <fmt-string>
    :=
    a quoted sprintf()-style format string
    <fmt-args>
    :=
    <fmt-arg> [, <fmt-arg>]*
    <fmt-arg>
    :=
    a value to be displayed
    • Formats a message using sprintf() and the prints it to the console and to the log file, depending upon the value of its <log-level> argument.
  • logSNP (<log-level>, <pause-level>, <fmt-string>, <fmt-args>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <fmt-string>
    :=
    a quoted sprintf()-style format string
    <fmt-args>
    :=
    <fmt-arg> [, <fmt-arg>]*
    <fmt-arg>
    :=
    a value to be displayed
    • Formats a message using sprintf() and the prints it to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
  • logP (<pause-level>, <string>)
    where:
    <pause-level>
    :=
    a signed integer that controls when to log
    <string>
    :=
    a quoted text string
    • Prints a message to the console and to the log file and then pauses, depending upon the value of its <pause-level> argument.
  • bannerN (<log-level>, <string>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <string>
    :=
    a quoted text string
    • Prints a 'banner' message to the console and to the log file, depending upon the value of its <log-level> argument.
    • A 'banner' message is one that is preceded and followed by line of asterisks in order to make the message stick out.
  • bannerSN (<log-level>, <fmt-string>, <fmt-args>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <fmt-string>
    :=
    a quoted sprintf()-style format string
    <fmt-args>
    :=
    <fmt-arg> [, <fmt-arg>]*
    <fmt-arg>
    :=
    a value to be displayed
    • Formats a 'banner' message using sprintf() and the prints it to the console and to the log file, depending upon the value of its <log-level> argument.
  • bannerNP (<log-level>, <pause-level>, <string>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <string>
    :=
    a quoted text string
    • Prints a 'banner' message to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
  • bannerSNP (<log-level>, <pause-level>, <fmt-string>, <fmt-args>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <fmt-string>
    :=
    a quoted sprintf()-style format string
    <fmt-args>
    :=
    <fmt-arg> [, <fmt-arg>]*
    <fmt-arg>
    :=
    a value to be displayed
    • Formats a 'banner' message using sprintf() and the prints it to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
  • dumpArray (<log-level>, <label>, <array>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <string>
    :=
    a quoted text string
    <array>
    :=
    array to be displayed
    • Prints a message followed by the contents of an array to the console and to the log file, depending upon the value of its <log-level> argument.
  • dumpArrayP (<log-level>, <pause-level>, <label>, <array>)
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <string>
    :=
    a quoted text string
    • Prints a message followed by the contents of an array to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
  • dumpArrayOfArrays (<log-level>, <label>, <array> [<opts>])
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <string>
    :=
    a quoted text string
    <array>
    :=
    array to be displayed
    <opts>
    :=
    , <quote-char> [, <disp-flags>]
    <disp-flags>
    :=
    a hex number, where the bits mean:
    0x01
    :=
    Indent list after 1st element
    0x02
    :=
    Number the first level of elements
    0x04
    :=
    Number all levels of elements
    • Prints a message followed by the contents of an array to the console and to the log file, depending upon the value of its <log-level> argument.
    • If <quote-char> string has a defined value, encloses each element with the specified character on each side as a quote mark.
    • The <disp-flags> control how the array is displayed.
  • dumpArrayOfArraysP (<log-level>, <pause-level>, <label>, <array> [<opts>])
    where:
    <log-level>
    :=
    a signed integer that controls when to log
    <pause-level>
    :=
    a signed integer that controls when to pause
    <string>
    :=
    a quoted text string
    <opts>
    :=
    , <quote-char> [, <disp-flags>]
    • Prints a message followed by the contents of an array to the console and to the log file, depending upon the value of its <log-level> argument. It can also pause, depending upon the value of its <pause-level> argument.
Previous: Object Functions Next: Other HFL Functions