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 7069803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:29:25+00:00 2026-05-28T05:29:25+00:00

Is there any .NET logging framework that have ability to switch appender if something

  • 0

Is there any .NET logging framework that have ability to switch appender if something is wrong with current one. Actually what I want is following:

If I’m using database appender and when something goes wrong with database (e.g. server goes down, lose power…) I want to switch to second appender (e.g. which log into file).

Does this ability have one of following: log4net, NLog, Enterprise Library? I was looking for this but no luck.

  • 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-28T05:29:25+00:00Added an answer on May 28, 2026 at 5:29 am

    Because log4netContribute FallbackAppender is not working as expected I’ve made deep research and found that this ability has nLog. I tested it and it is working like a charm 😉 Here is an example:

    [app.config]

    <?xml version="1.0"?>
    <configuration>
    <configSections>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
    </configSections>
    <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <variable name="appTitle" value="My Application"/>
    <targets>
    <target name="file" xsi:type="FallbackGroup" returnToFirstOnSuccess="true">
    <target xsi:type="File" fileName="x:\vladimir.txt" />
    <target xsi:type="File" fileName="w:\pavlovic.txt" />
    <target xsi:type="File" fileName="w:\zvjerka24.txt" />
    </target>
    </targets>
    <rules>
    <logger name="*" minlevel="Debug" writeTo="file" />
    </rules>
    </nlog>
    </configuration>
    

    [code]

    Logger _logger = LogManager.GetCurrentClassLogger();
    _logger.Info("Neki Info");
    _logger.Debug("Neki debug");
    _logger.Error("Neki  ERROR");
    _logger.Error("Pa jos neki");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have logging in place for any .Net Framework exceptions that occur in our
Is there any class in the .NET framework that can read/write standard .ini files:
Are there any .NET-specific tools out there that can parse / access the elementary
I'd like to know if there is any .Net class that allows me to
Is there any Library for .NET that returns SPARQL results in some structured List
is there any custom asp.net membership providers that someone has already created online. I
Are there any advantages compiling for .NET Framework 3.5 instead of 2.0? For example
I have a framework that uses log4net for logging, I know that we can
Is there any performance overhead in using RaiseEvent in .NET ? I have a
(Note: I have seen several questions regarding .NET logging frameworks, but haven't seen any

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.