I know the best place to ask this question is probably umbraco and I'll go there if I don't find any solutions here.
Every time a user logs in Umbraco logs user's email and IP address. I need to customize it (I need to replace email and IP address with some internal db id).
Is there a way to customize Umbraco logging? Not just add some custom logging, but also alter Umbraco's own logging.
I use UmbracoCms.Core 7.12.4 nuget pckg
It is unfortunately not possible to customize the logging entry being made by this audit event.
What you could do however is to extend the logging by adding another eventhandler to BackOfficeUserManager.LoginSuccess
that does the logging you need, and then you have the option of either simply filtering the output of the log or cleaning the log completely of the entries created by Umbraco itself.
You can see this class for reference on how the internal logging is done - you can do something similar for your own logging by adding the eventhandler on startup in a ApplicationEventHandler
: https://github.com/umbraco/Umbraco-CMS/blob/v7/dev/src/Umbraco.Core/Auditing/AuditEventHandler.cs#L60