Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7516087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:01:26+00:00 2026-05-30T01:01:26+00:00

I need to have the same code logging to two different places in two

  • 0

I need to have the same code logging to two different places in two different contexts. This applies to everything logged – information, warnings, errors – so that I get two separate traces for the two contexts.

I’m inexperienced using entlib, but know it has some functionality for distributing entries to multiple sources.

The code initiating the logging knows which context it is in. Hence, I’m thinking it might be possible to “tag” the LogEntry with some information and then have the LogWriter facade decide where to send entries based on this. Can I do that with just configuration? If not, what do I need to extend/modify in entlib?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:01:27+00:00Added an answer on May 30, 2026 at 1:01 am

    Actually it wasn’t too hard to find out.

    The solution is to
    – have the code create logentries in 2 different categories depending on context
    – distribute log entries to two log sources (*)
    – configure a filter for each log source so only the relevant category goes through

    (*) IMHO, “log source” is an illogical name, but this is the term used by EntLib for an object providing the actual logging implmentation. To my mind, “log destination” or “log provider” would be a far better term. A “log source” would be “the source of the logged information”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have different urls that points to the same code www.url1.com www.url2.com I need
I have two scripts that often need to be run with the same parameter:
I have two C DLLs that I need to access in the same executable.
I have two tables with the same columns, and I need to copy one
I have two properties files that are not the same and I need to
I need to have multiple forms in the same webpage, all of them POSTing
On my page I have n-userControls (same control) I need to communicate between them(to
I have multiple threads who all need to write to the same Dictionary. I
I have an asp.net mvc 2 app. I need to display the same page
I have been told to add logging to my code using log4net, the problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.