Click here to Skip to main content
15,906,816 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralCompuware Devpartner Pin
NicoJS5-Aug-04 23:54
NicoJS5-Aug-04 23:54 
GeneralCode commentor Pin
NicoJS5-Aug-04 23:40
NicoJS5-Aug-04 23:40 
GeneralRe: Code commentor Pin
matthias s.7-Aug-04 12:35
matthias s.7-Aug-04 12:35 
GeneralRe: Code commentor Pin
Bill Dean4-Sep-04 2:51
Bill Dean4-Sep-04 2:51 
Questionhow to reconstruct samples Pin
DawnYoshimura4-Aug-04 4:30
DawnYoshimura4-Aug-04 4:30 
GeneralJAVA source code Pin
3-Aug-04 9:35
suss3-Aug-04 9:35 
GeneralWindows Autherntication in ASP.NET Pin
R. Senthil Kumaran2-Aug-04 1:49
R. Senthil Kumaran2-Aug-04 1:49 
GeneralCustom EventLog Problem Pin
sayhigh29-Jul-04 23:42
sayhigh29-Jul-04 23:42 
Hi All,

I've created a common sub procedure that can log the service status into Custom EventLog.

'********************************************************************<br />
    ' Process: ServiceLog<br />
    ' Input: LogSource, strLog, strType, EventID, Category<br />
    ' Output: Write into EventLog<br />
    '********************************************************************<br />
    Public Sub ServiceLog(ByVal logSource As String, ByVal strLog As String, ByVal strType As EventLogEntryType, ByVal EventID As Integer, ByVal category As Short)<br />
        Dim logName As String = "My_Services Log"<br />
        If Not EventLog.SourceExists(logSource) Then<br />
            EventLog.CreateEventSource(logSource, logName)<br />
        End If<br />
<br />
        Dim MyLogAs New EventLog()<br />
        MyLog.Log = logName<br />
        MyLog.Source = logSource<br />
        MyLog.WriteEntry(logSource, strLog, strType, EventID, category)<br />
    End Sub<br />


My service was installed and run without error. When i check the EventLog, supposing that it should write into the my Custom Log["My_Service Log"],
but it wrote into the Application Log.

Any idea how to solve this?

Thanks...

Regards,

Sayhigh Soon, Junior Programmer
GeneralRe: Custom EventLog Problem Pin
Blake Miller30-Jul-04 11:55
Blake Miller30-Jul-04 11:55 
GeneralRe: Custom EventLog Problem Pin
Sayhigh Soon31-Jul-04 4:44
sussSayhigh Soon31-Jul-04 4:44 
GeneralRe: Custom EventLog Problem Pin
cmk2-Aug-04 0:47
cmk2-Aug-04 0:47 
GeneralRags To Riches Pin
doctrane23-Jul-04 23:15
doctrane23-Jul-04 23:15 
GeneralRe: Rags To Riches Pin
Atilla Ozgur24-Jul-04 5:56
Atilla Ozgur24-Jul-04 5:56 
GeneralRe: Rags To Riches Pin
doctrane24-Jul-04 6:08
doctrane24-Jul-04 6:08 
GeneralRe: Rags To Riches Pin
Atilla Ozgur25-Jul-04 1:59
Atilla Ozgur25-Jul-04 1:59 
GeneralRe: Rags To Riches Pin
doctrane25-Jul-04 3:49
doctrane25-Jul-04 3:49 
GeneralRe: Rags To Riches Pin
Atilla Ozgur25-Jul-04 3:59
Atilla Ozgur25-Jul-04 3:59 
GeneralRe: Rags To Riches Pin
doctrane25-Jul-04 4:47
doctrane25-Jul-04 4:47 
GeneralRe: Rags To Riches Pin
STW16-Aug-04 3:24
STW16-Aug-04 3:24 
GeneralFireWall Application Pin
Anonymous20-Jul-04 18:29
Anonymous20-Jul-04 18:29 
GeneralWindows services &amp; GUI in .NET Pin
ma.poggi-cons19-Jul-04 3:06
ma.poggi-cons19-Jul-04 3:06 
GeneralRe: Windows services &amp; GUI in .NET Pin
Tim Kohler19-Jul-04 3:35
Tim Kohler19-Jul-04 3:35 
GeneralRe: Windows services &amp; GUI in .NET Pin
ma.poggi-cons19-Jul-04 4:23
ma.poggi-cons19-Jul-04 4:23 
GeneralRe: Windows services &amp; GUI in .NET Pin
Tim Kohler19-Jul-04 5:20
Tim Kohler19-Jul-04 5:20 
GeneralRe: Windows services &amp; GUI in .NET Pin
ma.poggi-cons19-Jul-04 5:30
ma.poggi-cons19-Jul-04 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.