event-log

A loop approach to event-log preparation for `bupaR`: can this be vectorized?

血红的双手。 提交于 2019-12-24 11:22:42
问题 Background I have real data from a PLC, that I prepare for conversion to an event-log for use with the package bupaR . The data below are limited and simplified but contain information concerning resource, timestamp, state-type, and event_ID. I achieved the desired transformation documented below with loops. My question is, can this be done without loops, in a "vectorised" way? Goal: From this, I want to detect when an error occurs and I want to track it till it ends. It ends when the `State

How to write log to SECURITY event Log in C#?

前提是你 提交于 2019-12-24 10:27:44
问题 I want to write these values in the security event log: Console.WriteLine("Level: {0}", eventInstance.LevelDisplayName); Console.WriteLine("Date: {0}", eventInstance.TimeCreated); Console.WriteLine("Forrás: {0}", eventInstance.ProviderName); Console.WriteLine("Event id: {0}", eventInstance.Id); Console.WriteLine("Task: {0}", eventInstance.TaskDisplayName); string sSource; string sLog; string sEvent; sSource = eventInstance.ProviderName; sLog = "Security"; sEvent = eventInstance

PHP gzuncompress with file read and write errors

我怕爱的太早我们不能终老 提交于 2019-12-24 03:15:19
问题 I have a function that keeps track of events that happen through out the script. In an effort to use my resources effectively, I decided to compress the data that it generates. However, I keep getting this error: Unknown error type: [2] gzuncompress() [function.gzuncompress]: data error Here's the function: function eventlog($type, $message){ // Types: account,run,queue,system // Set up file name/location $eventfile = '/myprivatedirectory/'.date('Ymd').$type.'.log'; if(file_exists($eventfile)

Programmatically create a custom Eventlog view

北城以北 提交于 2019-12-23 21:42:09
问题 I want to programmatically create a custom Eventlog view in a C# application. This is how to create a custom Eventlog view with the help of the Eventlog application from Microsoft Windows: I searched the class System.Diagnostics.EventLog for a method that does the same as the button found in the Eventlog Application from Microsoft. Sadly, i couldn't find any functionality that covers my needs. Has anyone ever programmatically created a custom Eventlog view in C# or knows a way that works? 回答1

How do I read boot time events on Windows 7?

断了今生、忘了曾经 提交于 2019-12-23 20:18:58
问题 I am trying to use the ETW functions without success to read the file: C:\Windows\System32\winevt\Logs\Microsoft-Windows-Diagnostics-Performance%4Operational.evtx In order to capture boot time events. I have tried various functions - OpenTrace gives an error 161 EvtQuery gives an error 15000 Does anyone have a native code example of reading system trace files? 回答1: I got this working as follows - LPWSTR pwsPath = L"Microsoft-Windows-Diagnostics-Performance/Operational"; LPWSTR pwsQuery = L

read the windows event log by particular Source

时间秒杀一切 提交于 2019-12-23 18:22:47
问题 How can i read the windows event log by particular Source, Date time and category?? 回答1: Consider using EventLog Class. EventLog lets you access or customize Windows event logs, which record information about important software or hardware events. Using EventLog, you can read from existing logs, write entries to logs, create or delete event sources, delete logs, and respond to log entries. You can also create new logs when creating an event source. 回答2: You could use additional software

Windows EventLog Permissions

廉价感情. 提交于 2019-12-23 08:02:01
问题 What permissions do I need to give a User for them to be able to write to the Windows EventLog? I have an ASP.NET application that needs to impersonate a user and that impersonated user must be able to write the event log 回答1: To create an Event Log source you need to be an administrator, otherwise you should be able to write to it without elevated privileges. Maybe take a look at this article. 回答2: The MSDN docs on Event Logging (Win32) do not mention any required privileges. Regardless, I'm

Is showing the Exception StackTrace useful in a RELEASE assembly or only a DEBUG .dll

不想你离开。 提交于 2019-12-23 04:21:11
问题 I've gone to some lengths to improve the error handling in my webservice - in particular, showing the StackTrace as in this example: catch (Exception ex) { EventLog log = new EventLog(); log.Source = g_EventSource; StringBuilder msg = new StringBuilder("Exception in UpdateRecord method has been logged:"); msg.Append(Environment.NewLine); msg.Append("passedURL="); msg.Append(passedURL); msg.Append(Environment.NewLine); msg.Append(ex.Message); msg.Append(Environment.NewLine); msg.Append(ex

Silverlight Event Log in Isolated Storage

≡放荡痞女 提交于 2019-12-23 03:22:07
问题 Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one? Specific questions: Should I keep a stream writer open, or should I open,write, and close for each entry? How should I remove items from the log atomically? 回答1: I heard clog from codeplex is pretty good although it targets wcf, i read on codeproject about about a log4net approach that works for silverlight, although both of these log 2 wcf services, im sure with a bit of tweaking

Silverlight Event Log in Isolated Storage

偶尔善良 提交于 2019-12-23 03:22:02
问题 Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one? Specific questions: Should I keep a stream writer open, or should I open,write, and close for each entry? How should I remove items from the log atomically? 回答1: I heard clog from codeplex is pretty good although it targets wcf, i read on codeproject about about a log4net approach that works for silverlight, although both of these log 2 wcf services, im sure with a bit of tweaking