I have a gui that invoke applicaions instance. Every application use log4net root logger. The root logger gets the appenders from app.config. Every app.config contains TCP appender - that i wrote. The problem starts when im trying to rise up more than one application instance because the duplicate ports in use by the tcp appender.
The log4net section in my app.config looks like:
<log4net>
<root>
<level value="All" />
<appender-ref ref="TCPAppender" />
</root>
<appender name="TCPAppender" type="LogSender.TCPAppender,LogSender">
<Ip value="127.0.0.1"/>
<Port value="8183"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d %-5p [%t] %c - %m%n" />
</layout>
</appender>
</log4net>
Can I change the port from the code of the application instance invoker? Or there is other option?