Coder Social home page Coder Social logo

simonsunw / logger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fieldrndservices/logger

0.0 1.0 0.0 9.5 MB

A Log4j-like library for LabVIEW

Home Page: http://sine.ni.com/nips/cds/view/p/lang/en/nid/215388

LabVIEW 51.95% HTML 40.67% JavaScript 0.75% CSS 6.63%

logger's Introduction

Logger: A Log4j-like library for LabVIEW™

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.

Dependencies

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.

Installation

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.

Build

Packaging using VIPM Pro (recommended)

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.

Packaging using VIPM Free

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.

  1. Start LabVIEW 2018 or newer and open the Logger.lvproj file.
  2. From the Project Explorer window, File>>Save for Previous Version..., a new dialog will appear.
  3. Select 10.0 from the drop down menu.
  4. Click Save.... A new dialog will open.
  5. Create the <project root>\target\10.0 folder hierarchy in the project root, i.e. the same folder as the Logger.lvproj file, if it does not already exists.
  6. Click Save.
  7. Close LabVIEW 2018 or newer and the Logger.lvproj file.
  8. Navigate to <project root>\src.
  9. Copy the Help folder to <project root>\target\10.0\src.
  10. Start LabVIEW 2010.
  11. Open the <project root>\target\10.0\Logger.lvproj file. Do NOT open the project in any other version of LabVIEW.
  12. Run the Build.vi in the Scripts 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.
  13. Open the <project root>\target\10.0\configs\Logger.vipb file in VIPM.
  14. 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.
  15. Close VIPM.
  16. 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

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.

License

The Logger project is licensed under the BSD-3-Clause license. See the LICENSE file for information about licensing and copyright.

logger's People

Contributors

volks73 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.