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

  • SEARCH
  • Home
  • 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 7796695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:26:50+00:00 2026-06-01T23:26:50+00:00

We are talking about using the Adapter Pattern for logging. I’m not sure that

  • 0

We are talking about using the Adapter Pattern for logging. I’m not sure that this is a good idea since we will probably never change our logging implementation, but a question arose while we spoke about this : Does the abstract logging module should hide the configuration details of the various logging implementations ?

I have seen two projects using an Adapter Pattern to abstract logging (one of them is the Common Infrastructure Library for .NET).

In both projects, the configuration the client must provid depends on logging implementations. For example, the client must provide a Log4Net config file if log4net is used.

Am I wrong when I think that this is an incomplete implementation of the Adapter Pattern ? To me, if the client must have some knowledge about the adaptee, it will not be possible to swap the implementation without breaking the client…

But I’m not sure.

Thank you for your advice.

  • 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-06-01T23:26:51+00:00Added an answer on June 1, 2026 at 11:26 pm

    It depends.

    In general I agree. If a client needs to no something specific of a specifc service implementation in order to use it although the client is using some kind of abstraction, the abstraction is broken.

    But in your case I think you mix up two different clients of the logging library.

    One client is the application trying to get out information about its state into the world. It should not in any way be concerned with the configuration.

    The other client is who or whatever sets up the environment for your application. This client should ONLY be considered with configuration.

    So your Adapter is applying only for the first client is complete for this client.

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

Sidebar

Related Questions

What are some situations where languages should be mixed? I'm not talking about using
Talking about javax.crypto.Cipher I was trying to encrypt data using Cipher.getInstance(RSA/None/NoPadding, BC) but I
I read and article talking about moving beyond 960px width for websites. This width
I have the great book on stunning css3 and it's talking about using src:
In another question I was worried about using a web service that takes a
I'm talking about using the wiki syntax. Normally, I create an article by making
I'm trying to follow this tutorial about WP7 development: http://mobile.tutsplus.com/tutorials/windows/introduction-to-windows-mobile-7-development/ It's talking about using
I saw lots of articles talking about using SqlBulkCopy to copy content from csv
This is somewhat a very peculiar situation to me. Am not sure yet as
I have seen umpteen posts talking about working with pop window using window handle.

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.