Hi Shubham Jain, welcome to this mailing list. Plese consider subscribing to avoid future manual interventions by a human moderator.
The application works with consoleappender enabled when run from console. This indicates to me that the issue is related to the environment in headless mode. The symptoms disappear when the consoleappender is disabled in headless mode. This further indicates to me that the underlying root cause is related to writing output to console when in headless mode. Console output via the consoleappender is most probably not what you want the application to do in headless mode anyway. Therefore consider windows event logs or other sinks / appenders like databases or files when in headless mode. I can imagine that the root cause may be related to permission issues on your server machine. For concrete clues you may even have to debug the situation. Good luck and let us know about your findings. Future readers are going to be thankful for any valuable information they can get. Dominik -- Sent from my phone. Typos are a kind gift to anyone who happens to find them. On Sun, Nov 3, 2019, 14:39 Shubham Jain <shubhamjain1...@gmail.com> wrote: > Hi, > > I am facing issue when trying to use both RollingFileAppender and > ConsoleAppender in .net core log4net. We are launching a console > application (.net core 3.0) from apache server. When we are launching the > application from command prompt then everything works fine but when we > launch the application from server, the application hangs at log.info() > method after logging few lines. > > When I remove the ConsoleAppender from log4net.config and relaunch the > application from server then everything works perfectly. > > So, I came to the conclusion that this problem is happening due to multi > appender use or some configuration issues. > > Our requirement is to logging on both file and console.Please help or > suggest something to solve this problem. > > Thanks > Shubham Jain >