[ http://issues.apache.org/jira/browse/LOG4NET-39?page=all ]
     
Nicko Cadell resolved LOG4NET-39:
---------------------------------

    Fix Version: 1.2.9
     Resolution: Invalid

The hostname of the computer is stored in the GlobalContext property 
'log4net:HostName'. This property will hold the value of the 
System.Net.Dns.GetHostName if it is available, otherwise the 
Environment.MachineName value is used.

You can output this value using a PatternLayout with the 
%property{log4net:HostName} pattern.

You can also add your own values to the GlobalContext properties e.g.:

log4net.GlobalContext.Properties["Platform"] = "Stage";

> Add pattern to output machine name
> ----------------------------------
>
>          Key: LOG4NET-39
>          URL: http://issues.apache.org/jira/browse/LOG4NET-39
>      Project: Log4net
>         Type: New Feature
>   Components: Appenders
>     Reporter: Michael Teper
>      Fix For: 1.2.9

>
> It would be very useful in a context of an email appender to be able to 
> specify a "machine name" parameter as part of the layout in order to 
> differentiate between messages coming from dev, stage, and production 
> machines.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to