Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to globally add TenantId and TenancyName to logger entries? #8513


User avatar
0
dev1_premierpoint created

If I wanted to make sure that a TenantId and TenancyName value is always included in my Log4Net log entries and I'd like for it to be automatic (nothing required for the developer to do when writing a log entry), what would be the best way to do this? I am looking for some kind of solution that I can implement that is global to my application.

I tried searching the documentation and forums, but couldn't find any guidance.

From looking at the code, it seems like ITenantCache might be part of the solution, but I was unable to find any documentation on it.

Also, I realize that many log entries might not be tenant-specific, and for those, null values in TenantId and TenancyName are fine in the logs.

Jeff


3 Answer(s)
  • User Avatar
    0
    musa.demir created

    You can create log4net custom appender.

  • User Avatar
    0
    dev1_premierpoint created

    I guess I was looking more for some information on what the TenantCache is all about and its intended use (or non-use) by AspNetZero customers.

  • User Avatar
    0
    dev1_premierpoint created

    Actually, I am going to close this question and ask about TenantCache in another question with a more accurate subject in the heading.