jdunham Posted September 23, 2008 Report Share Posted September 23, 2008 Has anyone written an interface to log Windows system events from a labview application (events which can be browsed with Administrative Tools -> Event Viewer Quote Link to comment
Mark Smith Posted September 23, 2008 Report Share Posted September 23, 2008 QUOTE (jdunham @ Sep 22 2008, 11:57 AM) Has anyone written an interface to log Windows system events from a labview application (events which can be browsed with Administrative Tools -> Event Viewer Check out http://detritus.blogs.com/lycangeek/2005/10/event_log.html Mark Quote Link to comment
jdunham Posted September 23, 2008 Author Report Share Posted September 23, 2008 QUOTE (mesmith @ Sep 22 2008, 12:36 PM) Check outhttp://detritus.blogs.com/lycangeek/2005/10/event_log.html Mark Thanks for the link. I checked it out, and it works _except_ that for Vista, the first time you create a log, you have to be running as Administrator. The right way to do it is to do that with some custom code in the installer. What a pain. Quote Link to comment
Stobber Posted November 8, 2013 Report Share Posted November 8, 2013 Reviving this topic. Anybody have a native interface, or something that exposes a network API for RT targets? I have a multilingual app and need to log events from all sources to a common file in Windows, so NI's tools aren't an option. (Stupid walled garden!) Quote Link to comment
GregFreeman Posted November 8, 2013 Report Share Posted November 8, 2013 (edited) Reviving this topic. Anybody have a native interface, or something that exposes a network API for RT targets? I have a multilingual app and need to log events from all sources to a common file in Windows, so NI's tools aren't an option. (Stupid walled garden!) We have something but it doesn't go to a native windows log; it goes to our own log. It runs as a service and grabs messages via UDP, so messages can be published from RT and Host PCs, and logs them to files. Also comes with a standalone GUI and has different levels of customization for message filtering, along with an ActiveX control and API. Does this sound like something that would meet your needs? I can't promise anything because I know we wrap this into bids to customers so it wouldn't be freeware. Either way, I'd like to see if there is some demand for this type of thing out there. Edited November 8, 2013 by for(imstuck) Quote Link to comment
Stobber Posted November 8, 2013 Report Share Posted November 8, 2013 Honestly, working with something totally custom is really unattractive in comparison to using standard tools that have been out in the public space for years (or decades, in the case of Syslog and log4j). Quote Link to comment
GregFreeman Posted November 8, 2013 Report Share Posted November 8, 2013 Understandable, just wanted to throw it out there. Quote Link to comment
Phillip Brooks Posted November 8, 2013 Report Share Posted November 8, 2013 How about the LabVIEW Syslog Protocol Reference Library? http://zone.ni.com/devzone/cda/epd/p/id/5980 Quote Link to comment
Stobber Posted November 9, 2013 Report Share Posted November 9, 2013 Gotta run a Syslog server and provide a viewer. There are free/FOSS options out there, and we plan to fall back on Syslog if needed, but ETW and Event Viewer are built into Windows, which means we don't have to ship them ourselves. Quote Link to comment
JackDunaway Posted November 10, 2013 Report Share Posted November 10, 2013 (edited) Stobber: have you considered creating a logger actor (service/subsystem/agent) dedicated to performing this action? Other actors in your system, when they want to write an event to the log, would not perform the log write themselves; rather, the event is brokered through this Logger Actor, which contains all procedural behavior for writing to the Windows Event Log. The logger subsystem would provide a VI called "Serialize to Syslog" which has no dependencies (including, not being contained within the logger's library/class). This means that any arbitrary system in your application only needs two things: 1) a lightweight, dependency-less method to serialize into your log format du juor, and 2) access to the endpoint (actor reference/address/mailbox/enqueuer) of the logger actor. I've had good success logging within a single actor (rather than as a distributed effort throughout the system) since the disk (or generally, log store) is a shared resource. The logger actor can do things like batch writes, and it generally frees your other systems from this otherwise expensive, blocking action. This doesn't answer your original question, per se, but could at least contain the Event Logger API to a single actor on the Windows target. ***EDIT: This method is not unlike the LabVIEW Syslog Protocol Reference Library linked by Phillip, except you'd be using your existing actors and transport mechanisms. Perhaps you can pluck the APIs from that reference library and plug them into your own system...*** Edited November 10, 2013 by JackDunaway Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.