格式化日志

时间:2018-10-03 15:42:58

标签: c# log4net

我可以在控制台上进行格式化打印:

org.apache.axis2.AxisFault: The input stream for an incoming message is null.
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:91)
    at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)

如何使用Console.WriteLine( "{0} {1}", 1,2); 进行修改?

log4net

1 个答案:

答案 0 :(得分:1)

类似这样的东西:

log.InfoFormat("{0} {1}", 1, 2);