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 creating a VS2010 console app using C# language on .NetFramework 4. I
why this two call to toBinary function compute the same output (at least under
I'm trying to get OpenCV working under windows 7. I am able to generate
Sometimes I've seen a solution that includes up to three .csproj files for each
I am using TeamCity to run an MSBuild script that cleans and rebuilds one
I have a reasonably large C++ program (~11mb exe) compiled under VS2008 and was
Currently we use Boost in our SVN under a 3rd party directory. The problem
I do test driven development of c++ code and one thing I find awkward
I have Direct3D rendering library compiled with VS2008. The another application (built with VS2008)
I have a bunch of old VB.NET code, written originally on VS2005, and now

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.