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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:41:54+00:00 2026-05-22T18:41:54+00:00

Under my VS2010 solution I’ve this situation: WEBSITE Library1 Library2 On global.asax.cs I initialize

  • 0

Under my VS2010 solution I’ve this situation:

  • WEBSITE
  • Library1
  • Library2

On global.asax.cs I initialize the log4net configuration using:

private static log4net.ILog _logger = log4net.LogManager.GetLogger("globalASAX");

void Application_Start(object sender, EventArgs e)
{
    // Code that runs on application startup
    log4net.Config.XmlConfigurator.Configure();
    _logger.Info("[APPLICATION START] " + DateTime.Now.ToString());
} 

It works fine and Application start message is correclty available on log.txt file. The problem happens when I try to use log something on the classes available on DLL Library1 or Library2.

I added the row:

private static log4net.ILog _logger = log4net.LogManager.GetLogger(typeof(ImageRepository));

but when I try to all the _logger.error(“blabla”) nothing happens on log file; all properties of _logger are false (i.e. isdebugenable=false). How can I fix that? I followed the instruction available here:

http://logging.apache.org/log4net/release/manual/configuration.html

the configuration of log4net is under web.config file:

<log4net>
    <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
        <file type="log4net.Util.PatternString">
            <conversionPattern value="log\explorer-log-%date{ yyyy.MM.dd.HH.mm.ss}-[%processid].log"/>
        </file>
        <appendToFile value="true"/>
        <maximumFileSize value="1024KB"/>
        <maxSizeRollBackups value="5"/>
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date %level %logger - %message%newline"/>
        </layout>
    </appender>
    <root>
        <level value="DEBUG"/>
        <appender-ref ref="RollingFile"/>
    </root>
</log4net>

anyone can help me?
thanks,
Andrea

  • 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-22T18:41:55+00:00Added an answer on May 22, 2026 at 6:41 pm

    I suspect log4net cannot find the logger for your type ImageRepository. As a quick check create a named logger and try calling it.

    private static log4net.ILog _logger = log4net.LogManager.GetLogger("FooLog");
    

    And config

    <root>
        <level value="DEBUG"/>
        <appender-ref ref="RollingFile"/>
    </root>
    <logger name="FooLog">
        <level value="DEBUG"/>
        <appender-ref ref="RollingFile"/>
    </logger>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using VS2010 and opencv2.1. Under Win7, the sample programme is below: #include
I'm working on a VS2010 Solution containing an ASP.NET Website Project and 8 c#
Under Windows XP WPF true 3D content (which is usually displayed using the Viewport3D
Under what circumstances would this or would this not be safe? I have a
Under Linux, my C++ application is using fork() and execv() to launch multiple instances
I have a solution with just under 100 projects in it, a mix of
I have a VS2008 Professional solution that I tried to convert to VS2010 Professional
I must be missing something, i have VS2010 Premium. Under Templates, Test Projects ->
Expected output & output I get in debug mode, and release mode under VS2010,
After installing VS2010, I can no longer choose the solution platform in the toolbar

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.