Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to log in UTF-8 using EnterpriseLibrary.Logging
    primarykey
    data
    text
    <p>I am kind of stuck with my searches concerning EnterpriseLibrary.Logging. I have a listener and formatter set up like this:</p> <pre><code>&lt;add name="NormalLogListener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging" fileName="logs/MVC22.log" footer="" formatter="ShortLogFormatter" header="" rollInterval="Day" timeStampPattern="yyyy-MM-dd" maxArchivedFiles="14" /&gt; </code></pre> <p>...</p> <pre><code>&lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging" template="{timestamp(local)} - {severity} - {category} - {message}" name="ShortLogFormatter" /&gt; </code></pre> <p>I use this in multiple projects and it is working fine.</p> <p>Except for one thing, I want EnterpriseLibrary to create my log file with UTF-8-encoding (I get ANSI files per default), but unfortunately I have no clue how to do that.</p> <p>I have special characters in strings that I want to be able to log into my file (such as umlauts); I see the logging works fine, when I convert my file to UTF-8 and let it be used further, but I really want to have it created that way.</p> <p>Can this be done in the xml configuration or somewhere else?</p> <p>Thanks for any help in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload