【发布时间】:2014-10-23 02:43:45
【问题描述】:
我正在使用 Log4net 并且有一个方法来记录调用上下文
private void LogCallingProgramContext()
{
OperationContext context = OperationContext.Current;
if (context != null)
{
MessageProperties messageProperties = context.IncomingMessageProperties;
var endpointProperty =
messageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
if (endpointProperty != null)
{
string strCallingProgramContext = string.Format("Call from IP address {0} and port is {1}", endpointProperty.Address, endpointProperty.Port);
Logger.Info(strCallingProgramContext);
}
}
}
我想要的是有什么方法可以记录消息方法名称和参数
【问题讨论】:
-
Kamran,你是用什么方案来获取方法和参数的?
-
我继续我的其他任务,目前已完成手动记录我最需要的参数。所以实际上还没有合适的解决方案