2

We have a windows service using Quartz.net scheduler and we are using log4net for logging.

During the service execution our database went offline and after it came bacck online the log4neet stopped logging. we have to re-start the service again for the logging to start again.

we can see that the service is running as other tables are getting updated but nothing is getting logged.

is there something we can set or a way to get log4net continue logging after database comes online??

stuartd
  • 70,509
  • 14
  • 132
  • 163
fireholster
  • 622
  • 1
  • 9
  • 22
  • Activate the internal logging of log4net, it may give you some clues as to what is happenning: https://logging.apache.org/log4net/release/faq.html – samy Oct 29 '14 at 08:47
  • I've seen this happen where the logger is a static field or singleton instance - resolved by a getting a logger from the LogManager each time. – stuartd Oct 29 '14 at 15:25
  • @stuartd we do have the logger static and readonly.. is there going to be any performance issues of any type if we get the logger from LogManager each time? – fireholster Oct 29 '14 at 20:14
  • @fireholster the LogManager caches log instances so I would expect no significant performance hit – stuartd Oct 29 '14 at 20:21
  • tried it. did not work...:( – fireholster Oct 29 '14 at 20:31

0 Answers0