davisoa / nmodbus

Automatically exported from code.google.com/p/nmodbus
0 stars 1 forks source link

log4net logger name missleading #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Suggest 

private readonly ILog _log = LogManager.GetLogger(String.Concat(typeof
(ModbusMasterTcpConnection), ".Instance" + Interlocked.Add(ref 
instanceCounter, 1)));

In ModbusMasterTcpConnection instead of old version. Not the same 
convention as the other classes.

Original issue reported on code.google.com by fredrik....@isg.se on 2 Jun 2008 at 8:36

GoogleCodeExporter commented 9 years ago
Good point.

checking this change into the trunk - 

private readonly ILog _log = 
LogManager.GetLogger(Assembly.GetCallingAssembly(), 
            String.Format(CultureInfo.InvariantCulture, "{0}.Instance{1}",
typeof(ModbusMasterTcpConnection).FullName, Interlocked.Add(ref 
instanceCounter, 1)));

Thanks
Scott

Original comment by sja...@gmail.com on 2 Jun 2008 at 9:10