Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EntLib60] InvalidOperationException: The LogWriter is already set. #162

Open
icnocop opened this issue Dec 1, 2017 · 0 comments
Open

Comments

@icnocop
Copy link

icnocop commented Dec 1, 2017

Hi.

Thank you for Common.Logging.

If the log writer is already set externally, and an HTTP POST is sent to "/jsnlog.logger" for example, the following error occurs:

[InvalidOperationException]: The LogWriter is already set.
   at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.SetLogWriter(LogWriter logWriter, Boolean throwIfSet)
   at Common.Logging.EntLib.EntLibLoggerFactoryAdapter.GetWriter() in C:\_oss\common-logging\src\Common.Logging.EntLib60\Logging\EntLib\EntLibLoggerFactoryAdapter.cs:line 115
   at Common.Logging.EntLib.EntLibLoggerFactoryAdapter.get_LogWriter() in C:\_oss\common-logging\src\Common.Logging.EntLib60\Logging\EntLib\EntLibLoggerFactoryAdapter.cs:line 101
   at Common.Logging.EntLib.EntLibLoggerFactoryAdapter.CreateLogger(String name) in C:\_oss\common-logging\src\Common.Logging.EntLib60\Logging\EntLib\EntLibLoggerFactoryAdapter.cs:line 164
   at Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter.GetLoggerInternal(String key) in C:\_oss\common-logging\src\Common.Logging.Portable\Logging\Factory\AbstractCachingLoggerFactoryAdapter.cs:line 116
   at Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter.GetLogger(String key) in C:\_oss\common-logging\src\Common.Logging.Portable\Logging\Factory\AbstractCachingLoggerFactoryAdapter.cs:line 97
   at JSNLog.LogHandling.CommonLoggingAdapter.Log(FinalLogData finalLogData)
   at JSNLog.LogHandling.LoggerProcessor.ProcessLogRequest(String json, LogRequestBase logRequestBase, DateTime serverSideTimeUtc, String httpMethod, String origin, LogResponse response)
   at JSNLog.LoggerHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant