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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:54:29+00:00 2026-05-16T06:54:29+00:00

I can log info messages without a problem, but can’t figure out how to

  • 0

I can log info messages without a problem, but can’t figure out how to log verbose messages.
Any help would be welcomed.

My problem is:

loggingEvent.Level can be checked in the Format function. The possible values are amongst others, Info, Debug, Error, Verbose. There are more, but these are the ones I’ll be using mostly.

The actual log object only has the following methods:

Log.Info
Log.Debug
Log.Warn
Log.Error

As you can see – no verbose!

So how can I Log a verbose message, this is different to debug

Thanks in advance

  • 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-16T06:54:30+00:00Added an answer on May 16, 2026 at 6:54 am

    You can add a Verbose (or Trace level) to log4net by using extension methods. This is what I’m using:

    public static class ILogExtentions
    {
        public static void Trace(this ILog log, string message, Exception exception)
        {
            log.Logger.Log(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, 
                log4net.Core.Level.Trace, message, exception);
        }
    
        public static void Trace(this ILog log, string message)
        {
            log.Trace(message, null);
        }
    
        public static void Verbose(this ILog log, string message, Exception exception)
        {
            log.Logger.Log(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, 
                log4net.Core.Level.Verbose, message, exception);
        }
    
        public static void Verbose(this ILog log, string message)
        {
            log.Verbose(message, null);
        }
    
    }
    

    Usage example:

    public class ClientDAO
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(ClientDAO));
    
        public void GetClientByCode()
        {
            log.Trace("your verbose message here");
            //....
        }
    }
    

    Source:

    http://www.matthewlowrance.com/post/2010/07/14/Logging-to-Trace-Verbose-etc-with-log4net.aspx

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

Sidebar

Related Questions

I can't figure out how to log info-level messages to stdout, but everything else
I'm trying to use gwt-log on my gwt application but I can't get any
It runs without any log information. I can't find the log file on server
How can we write the JavaScript info and error messages to the log file
i want users can log in my website throw FB connect ON MOBILE but
Is there any way I can log a Wordpress user in given only their
I have to make a simple site which you can log in and out
I'm trying to learn the built-in features of tracing. I can't figure out how
I have several debug printouts in my script with console.log(message) , but no messages
I'm having trouble figuring out how to log messages with Sinatra. I'm not looking

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.