fieldrndservices / logger Goto Github PK
View Code? Open in Web Editor NEWA Log4j-like library for LabVIEW
Home Page: http://sine.ni.com/nips/cds/view/p/lang/en/nid/215388
A Log4j-like library for LabVIEW
Home Page: http://sine.ni.com/nips/cds/view/p/lang/en/nid/215388
If the message contains a double quote, it should be represented with a pair of double quotes as per the CSV standard.
'this is a "message" with quotes' ->'this is a ""message"" with quotes'
otherwise it is difficult to parse the CSV file.
We have made hard coded changes to our local code to increase the call chain index by +1 to avoid getting the packed project library included in the call chain. I'm not entirely sure how to implement this in a clean way, so before I invested a bunch of time I thought I could submit here to see if there was any interest.
The current development version is LabVIEW 2018. Upgrading to LabVIEW 2020 should be investigated. This is different than the minimum supported version (LabVIEW 2010). This is would be the version of LabVIEW needed to modify and contribute to the codebase.
Currently, the delimiter is hard-coded as a comma to create Comma-Separated Values (CSV) log files, but it would be nice to be able to configure the delimiter so that Tab-Separated Values (TSV) log files could be created.
I really love Logger right now, so this suggestion is purely hypothetical. I have been using Logger as part of some Actor Framework based applications. We started with a PPL of the logger code so that we could treat Logger like a standalone library that can be swapped out or shared as needed across multiple application development efforts easily.
I was wondering if anyone else has ever suggested converting the Logger architecture to the Actor Framework so that the FGV would map over to class data and the listeners would be spawned actors instead of just passing a listener queue. This is not a fully baked suggestion, just thinking out loud.
Following from #3 and @fuzzy-focus comment, the inline checkbox for the VI's execution properties are unchecked in the package (VIP).
I believe I found the source of the problem. Inlining is not supported in LabVIEW 2009. So, when the project is saved to LabVIEW 2009 for packaging, the inlining is dropped and the checkbox is unchecked for all versions of LabVIEW newer than 2009.
Inlining was introduced in LabVIEW 2010. Support for LabVIEW 2009 will be dropped and the minimum LabVIEW version will be 2010 for all future releases.
If a custom extension (e.g. *.log) is used, old logfiles will never be deleted as they are not checked for.
Maximum File Size configuration parameter does not have units specified. I guess it is in bytes, but it would be great to mention it somewhere.
In order to ensure there is no stray logger instance active (ensure a known good starting state), I call StopFile and Shutdown before initializing and starting logger during the initialization phase of my application. However, when I do this with the current library I encounter what could be considered unhandled exceptions (or properly thrown errors ๐). This is easy to simulate by calling StopFile & shutdown without an active, configured instance of logger present.
Proposed Changes:
We're investigating the Logger framework for use on a real-time system. It seems to work fine so far, except one issue. When the controller shuts down unexpectedly (power loss in the middle of operation) the logfile is deleted after the restart. It might be because the file is never actually written to disk, but is only in memory.
I looked at the code, and I added a Flush File in the False case in File.lvlib:Write.vi. This seems to resolve the issue, the logfile is still there after an unexpected shutdown.
I'm aware this might have consequences on the performance, since this forces the file write to disk to be synchronous instead of leaving the decision when to actually write to file to the OS. So probably the best thing would be to make this configurable.
Other minor points:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.