Hoe to manage Machine Name dynamically in Logging Application Block

Topics: Logging Application Block
Nov 9, 2008 at 3:09 AM
       I am trying ro implement Logging Application Block into one of my Application. I have a senario where I am logging my logs to a central Log store. Inside Logging Application Block Machine Name is used to identify the source of the log. But unfortunetly it has to be present in the configuration file of the application which was generated using Enterprinse Library Configuration tool. In this way I have to specify this Machine Name at the time of creation of the app.config file. When we have many systems where the application will be deployed is there any way the machine name can be dynamically added to the app.config file or using any class method?

    Your help will be great resource for me.


Nilkanth Desai
Nov 10, 2008 at 2:26 AM

You dont have to add the Machine Name to the config file because the MachineName is automatically populated by the Logging Application Block based on the machine from which the log is originating. 

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.