How to change Container logging to the Windows Event Log

14/12/2017 Stuart Moore

By default, Containers log to text files in their current working directory. Containers can be configured to log to the Windows Event Log.

Step-by-step guide

  1. Open Cloudhouse.Container.Deployment.exe.config from the deployment folder.
  2. Use the sample replacement config below.
  3. Change "Cloudhouse AppName" to the desired application name.

<?xml version="1.0" encoding="utf-8"?>
  <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
   <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
   <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
     <logName value="Application"/>
     <applicationName value="Cloudhouse AppName"/>
     <layout type="log4net.Layout.PatternLayout">
       <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />

 <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> 
   <layout type="log4net.Layout.PatternLayout">
     <conversionPattern value="%date %-5level %logger - %message%newline"/>
    <level value="INFO"/>
    <appender-ref ref="ConsoleAppender"/>
    <appender-ref ref="EventLogAppender"/>

Note: Text in italics indicates changes to the default configuration

Applies To

Cloudhouse Containers

Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support