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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:46:50+00:00 2026-06-02T18:46:50+00:00

<configuration> <!– Register the section handler for the log4net section –> <configSections> <section name=log4net

  • 0
<configuration>
    <!-- Register the section handler for the log4net section -->
    <configSections>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
    </configSections>
    <!-- This section contains the log4net configuration settings -->
    <log4net debug="true">
        <!-- Define the default appender -->
        <appender name="PowerFAIDSLogger" type="log4net.Appender.RollingFileAppender,log4net">
      <file type="log4net.Util.PatternString" value="%env{ALLUSERSPROFILE}\Company Name\App Name\data_integration.log"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Size"/>
            <param name="MaxSizeRollBackups" value="10"/>
            <param name="MaximumFileSize" value="512KB"/>
            <param name="StaticLogFileName" value="true"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="{%d{MMM-dd-yyyy} ~ %t} %10r %-5p [%x] &lt;%X{diagnostic}&gt; - %m%n"/>
            </layout>
        </appender>
        <appender name="PerformanceLogger" type="log4net.Appender.RollingFileAppender,log4net">
      <file type="log4net.Util.PatternString" value="%env{ALLUSERSPROFILE}\Company Name\App Name\performance.log"/>
            <param name="AppendToFile" value="true"/>
            <param name="RollingStyle" value="Size"/>
            <param name="MaxSizeRollBackups" value="10"/>
            <param name="MaximumFileSize" value="512KB"/>
            <param name="StaticLogFileName" value="true"/>
            <layout type="log4net.Layout.PatternLayout,log4net">
                <param name="ConversionPattern" value="{%d{MMM-dd-yyyy} ~ %t} %10r %-5p [%x] &lt;%X{DR} %X{NA}&gt; - %m%n"/>
            </layout>
        </appender>
    <appender name="TransactionLogger" type="log4net.Appender.RollingFileAppender,log4net">
      <file type="log4net.Util.PatternString" value="%env{ALLUSERSPROFILE}\Company Name\App Name\data_integrationTransaction.log"/>
      <param name="AppendToFile" value="true"/>
      <param name="RollingStyle" value="Size"/>
      <param name="MaxSizeRollBackups" value="10"/>
      <param name="MaximumFileSize" value="512KB"/>
      <param name="StaticLogFileName" value="true"/>
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="{%d{MMM-dd-yyyy} ~ %t} %10r %-5p [%x] &lt;%X{DR} %X{NA}&gt; - %m%n"/>
      </layout>
    </appender>
        <!-- Define the email appender -->
        <appender name="SMTPAppender" type="log4net.Appender.SMTPAppender">
            <param name="To" value="someone@abc.com"/>
            <param name="From" value="jdf@CompanyName.org"/>
            <param name="Subject" value="App Name Error Message"/>
            <param name="SMTPHost" value="ecogsdf.CompanyName.local"/>
            <param name="LocationInfo" value="false"/>
            <param name="BufferSize" value="512"/>
            <param name="Lossy" value="true"/>
            <evaluator type="log4net.spi.LevelEvaluator">
                <param name="Threshold" value="WARN"/>
     </evaluator>
            <layout type="log4net.Layout.PatternLayout">
                <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n"/>
            </layout>
        </appender>
   <!-- Setup the loggers, add the appenders and set the default priority   -->
    <logger name="PerformanceLogger">
            <priority value="ALL"/>
            <appender-ref ref="PerformanceLogger"/>
        </logger>
        <logger name="App NameLogger">
            <priority value="WARN"/>
            <appender-ref ref="App NameLogger"/>
        </logger>
         <logger name="TransactionLogger">
                <level value="INFO" />
                <appender-ref ref="TransactionLogger"/>
            </logger>
   </log4net>
</configuration>

‘ CODE
New Logger().Info(“Write some info”)

When I call the above code it’s not writing any output to data_integrationTransaction.log file. But New Logger().Error(“Write some error”) works fine.

I appreciate your support.

  • 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-02T18:46:51+00:00Added an answer on June 2, 2026 at 6:46 pm

    The recommended way to get a logger is as shown here, not as you have it. I would try this again following the log4net docs.
    ILog log = LogManager.GetLogger(“application-log”);

    log.Info("Application Start");
    log.Debug("This is a debug message");
    
    if (log.IsDebugEnabled)
    {
        log.Debug("This is another debug message");
    }
    

    You might also want to set up a <root> element to clarify the default levels for your appenders.

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

Sidebar

Related Questions

I have this configuration in my web.config. <siteMap defaultProvider=Provider1 enabled=true> <providers> <add name=Provider1 siteMapFile=Web.sitemap
Your configuration file contains settings (root with no password) that correspond to the default
Servlet Configuration in web.xml <servlet> <description>This is the description of my J2EE component</description> <display-name>This
My configuration looks like this: <hibernate-configuration xmlns=urn:nhibernate-configuration-2.2 > <session-factory name=kvws.kist.suche.dbadapter.nhentities> <!-- Driver --> <property
Note: Configuration are being kept in a PHP file, config.php . I've seen this
My configuration of backends.yaml backends: - name: mybackend class: B1 instances: 1 options: dynamic
The debug configuration of my app is built against: PYTHON25_D.DLL MSVCR80D.DLL We use Python
{Configuration system failed to initialize} i get this error while trying to run a
for configuration as following <MyCollection default=one> <entry name=one ... other attrubutes /> ... other
This configuration works fine, but inbound-channel-adapter which is supposed to poll every 15 secs

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.