i've got small console application running topshelf , using serilog logging facility i'd run owin inside. start app builder, every log message gets duplicated via trace listener , thus, printed out twice console.
// serilog sink configuration new loggerconfiguration() .writeto.trace() ... .createlogger(); // topshelf hostlogger.uselogger(new seriloglogwriterfactory.seriloghostloggerconfigurator()); i found this answer here , included following before start web host:
webhostoptions.settings.add(typeof (itraceoutputfactory).fullname, typeof (webappbuilder.nulltraceoutputfactory).assemblyqualifiedname); trace.listeners.remove("hostingtracelistener"); the funny thing is: when first started application after inserting lines, worked (e.g. double messages gone.). after cleaned \bin directory, started appear again. do?
please check out highly professional drawing made should further explain issue:

Comments
Post a Comment