Creating a Cluster Resource DLL (Part 5): Logs

Published Mar 15 2019 02:06 PM 310 Views
Microsoft

First published on MSDN on Aug 23, 2010

Hi,

 

In this series of blog posts we will help you to design, develop and debug the Resource DLL you are developing to give your application high-availability with Windows Server 2008 & 2008 R2 Failover Clustering.

 

We recommend you start with the other blog post in the series:

 

 

In this post we will describe how to write to logs from within the Resource DLL.

 

First familiarize yourself with the Startup call:

 

http://msdn.microsoft.com/en-us/library/aa372931(VS.85).aspx

 

During the Startup call you are being provided with the LogEvent function pointer.  This is designed for the diagnostics logging, and the messages you log using this method go straight to the cluster log and are interleaved with messages from the other cluster components.  You can create or see the log by following the instructions provided in this blog post

 

http://blogs.msdn.com/b/clustering/archive/2008/09/24/8962934.aspx

 

For more information on the logging see http://msdn.microsoft.com/en-us/library/aa370823(VS.85).aspx .

 

Many of the Cluster Administrators are familiar with the cluster log so writing your message there is the best way to go about providing information to users.

 

I hope this series of blog posts will be helpful when you design your own Resource DLL.

 

Thanks,
Vladimir Petter
Senior Software Development Engineer
Clustering & High-Availability
Microsoft

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-371648%22%20slang%3D%22en-US%22%3ECreating%20a%20Cluster%20Resource%20DLL%20(Part%205)%3A%20Logs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-371648%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Aug%2023%2C%202010%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20series%20of%20blog%20posts%20we%20will%20help%20you%20to%20design%2C%20develop%20and%20debug%20the%20Resource%20DLL%20you%20are%20developing%20to%20give%20your%20application%20high-availability%20with%20Windows%20Server%202008%20%26amp%3B%202008%20R2%20Failover%20Clustering.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20recommend%20you%20start%20with%20the%20other%20blog%20post%20in%20the%20series%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPart%201%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-1%2Fba-p%2F371600%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-1%2Fba-p%2F371600%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EPart%202%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-2%2Fba-p%2F371606%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-2%2Fba-p%2F371606%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EPart%203%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-3%2Fba-p%2F371614%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-3%2Fba-p%2F371614%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EPart%204%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-4-IsAlive-LooksAlive%2Fba-p%2F371647%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FFailover-Clustering%2FCreating-a-Cluster-Resource-DLL-Part-4-IsAlive-LooksAlive%2Fba-p%2F371647%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20post%20we%20will%20describe%20how%20to%20write%20to%20logs%20from%20within%20the%20Resource%20DLL.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%20familiarize%20yourself%20with%20the%20Startup%20call%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Faa372931(VS.85).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Faa372931(VS.85).aspx%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDuring%20the%20Startup%20call%20you%20are%20being%20provided%20with%20the%20LogEvent%20function%20pointer.%20%26nbsp%3BThis%20is%20designed%20for%20the%20diagnostics%20logging%2C%20and%20the%20messages%20you%20log%20using%20this%20method%20go%20straight%20to%20the%20cluster%20log%20and%20are%20interleaved%20with%20messages%20from%20the%20other%20cluster%20components.%20%26nbsp%3BYou%20can%20create%20or%20see%20the%20log%20by%20following%20the%20instructions%20provided%20in%20this%20blog%20post%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.msdn.com%2Fb%2Fclustering%2Farchive%2F2008%2F09%2F24%2F8962934.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fblogs.msdn.com%2Fb%2Fclustering%2Farchive%2F2008%2F09%2F24%2F8962934.aspx%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20on%20the%20logging%20see%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Faa370823(VS.85).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Faa370823(VS.85).aspx%20%3C%2FA%3E%20.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMany%20of%20the%20Cluster%20Administrators%20are%20familiar%20with%20the%20cluster%20log%20so%20writing%20your%20message%20there%20is%20the%20best%20way%20to%20go%20about%20providing%20information%20to%20users.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20series%20of%20blog%20posts%20will%20be%20helpful%20when%20you%20design%20your%20own%20Resource%20DLL.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%20%3CBR%20%2F%3EVladimir%20Petter%20%3CBR%20%2F%3ESenior%20Software%20Development%20Engineer%20%3CBR%20%2F%3EClustering%20%26amp%3B%20High-Availability%20%3CBR%20%2F%3EMicrosoft%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-371648%22%20slang%3D%22en-US%22%3E%3CP%3EFirst%20published%20on%20MSDN%20on%20Aug%2023%2C%202010%20Hi%2C%26nbsp%3BIn%20this%20series%20of%20blog%20posts%20we%20will%20help%20you%20to%20design%2C%20develop%20and%20debug%20the%20Resource%20DLL%20you%20are%20developing%20to%20give%20your%20application%20high-availability%20with%20Windows%20Server%202008%20%26amp%3B%202008%20R2%20Failover%20Clustering.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-371648%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eresource%20dll%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Evladimir%20petter%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ewindows%20server%202008%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ewindows%20server%202008%20r2%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Aug 28 2019 09:20 AM
Updated by: