Logger is a small logging utility modeled after the Log4j and similar libraries but for the LabVIEW programming language and environment published and distributed by National Instruments (NI).
This add-on can be used to create a robust, full-feature application logging and error-handling system for any LabVIEW-based application. Logging statements are written as Comma-Separated Values (CSV) lines to a log file. Log files are managed and organized by calendar date and file name to reduce clutter and on-disk storage space. Logging can be configured to automatically close and create a new log file based on file size. Advanced error-handling capabilities are provided by combining level-based application logging with the LabVIEW General Error Handler VI to easily catch, log, clear, and display errors based on verbosity, severity, and configuration. The library is written 100% in LabVIEW and can run on any system that can run LabVIEW.
- Caraya
- HTML Help Workshop (for compiling the help documentation)
- JKI State Machine
- LabVIEW 2010 or newer (for building)
- LabVIEW 2018 or newer (for development)
- Labricator (only for automated builds, private package)
- OpenG Array Library
- OpenG File Library
- VIPM Pro (only for automated builds)
- VIPM API (only for automated builds)
The Caraya, JKI State Machine, OpenG Array Library, OpenG File Library, and VIPM API dependencies must be installed for all versions of LabVIEW (2010 and 2018) to avoid errors during automated builds.
A VI Package (VIP) is available on the NI's LabVIEW Tools Network. It is recommended to use the VI Package Manager published by JKI to install and update the library. The library can also be installed by: (i) downloading the source code and building the VIP, (ii) downloading a VIP from the releases section of this project, (iii) manually copying the VIs from the source code into a project, or (iv) requesting a VIP from the authors.
Important, if creating a package for LabVIEW 2010 from LabVIEW 2018, the VI Server TCP/IP ports must be different for each version of LabVIEW and verified with the VIPM application before proceeding. An error will occur when the VIPM is started if both LabVIEW 2010 and 2018 are running at the same time. Basically, VIPM will not know which VI server to use if both versions of LabVIEW are using the same TCP/IP port.
If VIPM Pro is available, then open the Logger.lvproj
file in any version of LabVIEW newer than 2010 and run the Package.vi
located in the Scripts
project library of the Project Explorer window. Ensure all dependencies are installed before running the Package.vi
script.
Note, the version number for the package is set in the configs\Logger.vipb
file. The version number in the VIP build specification file should be modified and saved before running the Package.vi
script.
If VIPM Pro is not available, then the following steps can be executed to do essentially the same thing as the Package.vi
script. Ensure all dependencies, except VIPM Pro and the VIPM API, are installed before completing these steps.
- Start LabVIEW 2018 or newer and open the
Logger.lvproj
file. - From the Project Explorer window, File>>Save for Previous Version..., a new dialog will appear.
- Select 10.0 from the drop down menu.
- Click Save.... A new dialog will open.
- Create the
<project root>\target\10.0
folder hierarchy in the project root, i.e. the same folder as theLogger.lvproj
file, if it does not already exists. - Click Save.
- Close LabVIEW 2018 or newer and the
Logger.lvproj
file. - Navigate to
<project root>\src
. - Copy the
Help
folder to<project root>\target\10.0\src
. - Start LabVIEW 2010.
- Open the
<project root>\target\10.0\Logger.lvproj
file. Do NOT open the project in any other version of LabVIEW. - Run the
Build.vi
in theScripts
project library to build each Source Distribution under the "Build Specifications" tree item and the compiled help documentation file (Logger.chm
). The output of each build will be available in<project root>\target\10.0\builds
. - Open the
<project root>\target\10.0\configs\Logger.vipb
file in VIPM. - Build the VI package with VIPM. The output will be available at
<project root>\target\10.0\packages
. Do NOT modify anything in the package build specification, but ensure the "2010" version of LabVIEW is selected in the upper, right-hand corner of the VIPM application window. - Close VIPM.
- Close LabVIEW 2010 and the
<project root>\target\10.0\Logger.lvproj
file.
See the in-app LabVIEW Help system for more information and documentation about using the library after it has been installed. Examples are also available within the LabVIEW development environment.
Tests are written in LabVIEW using the Caraya unit testing framework and included in the project via the Tests.lvlib
project library and the tests
on-disk folder. To run the tests, open the Logger.lvproj
file found in the project root in the LabVIEW Development Environment and run the Test.vi
script located in the Scripts.lvlib
project library. This will run all of the tests defined in the project.
The Logger
project is licensed under the BSD-3-Clause license. See the LICENSE file for information about licensing and copyright.