Has anybody got this working yet? I was trying to put a logger in a function, but using their sample code gives me an error. Cannot find anything like Ice.Logging or Ice.ApplicationLogging to add in the references or services list. What am I missing?
Didn’t read far enough lol. I was looking for Ice.Logging.
To be fair, it should probably have that info near the top, lol.
This is kinda neat. Didn’t know this was a thing.
In case anybody else is having a hard time following the instructions and needs more pictures too lol:
I guess I am still doing it wrong.
[CDATA[System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘DisposableLogger’.
at Epicor.Hosting.Trace.DisposableLogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter) in C:_releases\ICE\ICE4.3.200.0\Source\Server\Framework\Epicor.System\Hosting\Trace\DisposableLogger.cs:line 52
at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object args)
at Microsoft.Extensions.Logging.LoggerExtensions.LogInformation(ILogger logger, String message, Object args)
I was trying to put it in the catch
I will have to try it that way instead
After your code goes out of using(logger){} the logger is disposed.
Yay it worked, had a stray bracket