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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:49:03+00:00 2026-05-31T12:49:03+00:00

I do not know why my log file is not created . Here is

  • 0

I do not know why my log file is not created . Here is my config entries for Log4Net

 <log4Net>

<root>
  <level value="DEBUG"/>
  <appender-ref ref="RollingFileAppender"/>
</root>
   <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date{ABSOLUTE} [%thread] %level %logger - %message%newlineExtra Info: %property{testProperty}%newline%exception"/>
  </layout>
  <filter type="log4net.Filter.LevelRangeFilter">
    <levelMin value="INFO"/>
    <levelMax value="FATAL"/>
  </filter>
</appender>

<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
  <param name="File" value="log.txt"/>
  <param name="appendToFile" value="true"/>
  <rollingStyle value="Size"/>
  <maxSizeRollBackups value="5"/>
  <maximumFileSize value="10MB"/>
  <staticLogFileName value="true"/>

  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date [%thread] %level %logger - %message%newlineExtra%newline%exception"/>
  </layout>
</appender>

<logger name="Log4NetTest.OtherClass">
  <level value="DEBUG"/>
  <appender-ref ref="ConsoleAppender"/>
</logger>

Then at my application startup I take care to run the follwoing line :

log4net.Config.XmlConfigurator.Configure(); 

And having the following at the declare section of each of my classes :

//use for logging information
    private static readonly log4net.ILog log = log4net.LogManager.GetLogger(
        System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

Then when using

log.Fatal("Fatal : Startup start")

it should create a log entry in the outpout directory of my project ! But not file exist

What did I do wrong in here ?

regards
serge

  • 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-31T12:49:06+00:00Added an answer on May 31, 2026 at 12:49 pm

    In fact what I do wrong is that I get a section definition as log4*N*et and in the section itself it was define as .

    This prevent logging information

    regards
    serge

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

Sidebar

Related Questions

I have a log file created by log4net which changes every hour. Is there
I do not know if this is possible, but here goes. And working with
I am using log4net for logging my asp.net application. However the log file is
If you do not know what Pipe Viewer is (I did not know about
I do not know javascript right now but I am planning on learning it.
I do not not know much about Regex, I want to try parsing sting
I do not know why there are 2 matches found aside from the input
well i do not know how to use sql union properly . i have
I know many people who use computers every day, who do not know how
I faced a little trouble - I do not know if I can define

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.