从2个不同的服务器读取事件日志 [英] reading event log from 2 different servers

查看:66
本文介绍了从2个不同的服务器读取事件日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个服务器,其中一个事件获取日志(使用不同的源名称)
我必须从两个服务器的日志中读取消息,并获取消息中写入的时间,并通过操纵它来将其用于进一步的项目目的

I have 2 servers where a event get logs (with different source name)
I have to read out the message from both server''s log and fetch out the time written in the message and use it for further project purpose by manipulating it

Can any one help me with this.

推荐答案

Imports System.Diagnostics

    Public Sub ListEventLog(ByVal logName As String)
        Dim objLog As New EventLog
        objLog.Log = logName

        If objLog.Entries.Count > 0 Then
            For Each l As EventLogEntry In objLog.Entries

            Next
        End If
    End Sub


这篇关于从2个不同的服务器读取事件日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆