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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:56:45+00:00 2026-06-17T12:56:45+00:00

App.config looks like this: <appender name=MemoryAppender type=log4net.Appender.MemoryAppender> <layout type=log4net.Layout.PatternLayout> <conversionPattern value=%date [%thread] %-5level –

  • 0

App.config looks like this:

<appender name="MemoryAppender" type="log4net.Appender.MemoryAppender">
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date [%thread] %-5level - %message" />
  </layout>
</appender>

Code looks like this:

foreach (var ev in events)
{
   string msg = ev.RenderedMessage;
}

The string returned from ev.RenderedMessage is just the message, not the entire pattern. I’ve also tried using WriteRenderedMessage with a StringWriter and the result was the same. Is there a way to get the message with the pattern applied?

  • 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-17T12:56:46+00:00Added an answer on June 17, 2026 at 12:56 pm

    I found it 🙂

    var events = _ma.GetEvents();
    string result = "";
    using (StringWriter writer = new StringWriter())
    {
        foreach (var ev in events)
        {
            _ma.Layout.Format(writer, ev);
            writer.Write(Environment.NewLine);
        }
        result = writer.ToString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a config Section in my app.config that looks like this <configSections> <section
I have an app.config file that looks like this: <?xml version=1.0 encoding=utf-8 ?> <configuration>
this is my common app.config <?xml version=1.0 encoding=utf-8 ?> <configuration> <connectionStrings> <add name=BO connectionString=Data
This is my App.Config <?xml version=1.0 encoding=utf-8 ?> <configuration> <appSettings> <add key=lang value=English/> </appSettings>
My index.html looks like this: <div id=div1 ng-controller=StartMenu> <div id=button1 ng-click=doSomething()></div> {{value}} </div> <div
this is my app.config <configuration> <startup useLegacyV2RuntimeActivationPolicy=true> <supportedRuntime version=v4.0/> </startup> <connectionStrings> <add name=DataBaseEntity connectionString=metadata=res://*/DBModel.csdl|res://*/DBModel.ssdl|res://*/DBModel.msl;provider=System.Data.SQLite;provider
Below is my app.config <?xml version=1.0 encoding=utf-8 ?> <configuration> <system.serviceModel> <services> <service name=Indexer> <endpoint
/app/config/parameters.ini [parameters] database_driver = pdo_mysql database_host = localhost database_port = database_name = my_dbname database_user
How is the app.config binding in .Net? Let's say if I have an application
I have an app.Config that was created on the dev machine running Windows 7.

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.