0
visility created
I want to use logger in regular class to post messages to Auditlog. I followed this procedure: https://aspnetboilerplate.com/Pages/Documents/Logging But I did not get a Logger injected. Then I tried to add the ILogger to constructor and I got a logger : "{log4net.Repository.Hierarchy.DefaultLoggerFactory+LoggerImpl}" But when I use the logger to add a Error - nothing comes to the Audit log.
Could you explain how to use Logger to add a message to Auditlog?
Thank you, Thøger
1 Answer(s)
-
0
Hi,
ILogger is used for logging text to a log file. If you want to use AuditLogs, you need to inject
IAuditingStore
, see https://aspnetboilerplate.com/Pages/Documents/Audit-Logging#about-iauditingstore