visual studio 2013 - Change name of source in Enterprise Library Logging -
i using enterprise library logging easly log event viewer in windows.
but don't know how change source if possible in enterprise library logging name of application (myapp example).
i using visual editor easly edit options in enterprise library logging called: enterprise library configuration can see in picture.
this app.config file generated enterprise library configuration editor:
<configuration> <configsections> <section name="loggingconfiguration" type="microsoft.practices.enterpriselibrary.logging.configuration.loggingsettings, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="true" /> <section name="exceptionhandling" type="microsoft.practices.enterpriselibrary.exceptionhandling.configuration.exceptionhandlingsettings, microsoft.practices.enterpriselibrary.exceptionhandling, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="true" /> <section name="settingsconfiguration" type="et.settings.settingsconfigurationsection, e-trace.settings, version=1.0.0.0, culture=neutral, publickeytoken=403b794e0e68acbe" requirepermission="false" /> <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> </configsections> <loggingconfiguration name="" tracingenabled="true" defaultcategory="general"> <listeners> <add name="event log" type="microsoft.practices.enterpriselibrary.logging.tracelisteners.formattedeventlogtracelistener, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" listenerdatatype="microsoft.practices.enterpriselibrary.logging.configuration.formattedeventlogtracelistenerdata, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" source="enterprise library logging" formatter="simple formatter" log="application" traceoutputoptions="timestamp, callstack" filter="all" asynchronous="true" /> <add listenerdatatype="microsoft.practices.enterpriselibrary.logging.configuration.customtracelistenerdata, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" type="et.logging.tracelistener.consoletracelistener, e-trace.logging, version=1.1.0.0, culture=neutral, publickeytoken=403b794e0e68acbe" name="consoletracelistener" formatter="simple formatter" /> </listeners> <formatters> <add type="microsoft.practices.enterpriselibrary.logging.formatters.textformatter, microsoft.practices.enterpriselibrary.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" template="{timestamp(local)} - {severity} : {message}" name="simple formatter" /> </formatters> <categorysources> <add switchvalue="all" name="general"> <listeners> <add name="consoletracelistener" /> <add name="event log" /> </listeners> </add> </categorysources> <specialsources> <allevents switchvalue="all" name="all events" /> <notprocessed switchvalue="all" name="unprocessed category" /> <errors switchvalue="all" name="logging errors & warnings"> <listeners> <add name="consoletracelistener" /> </listeners> </errors> </specialsources> </loggingconfiguration> <exceptionhandling> <exceptionpolicies> <add name="log policy"> <exceptiontypes> <add name="all exceptions" type="system.exception, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" posthandlingaction="none"> <exceptionhandlers> <add name="logging exception handler" type="microsoft.practices.enterpriselibrary.exceptionhandling.logging.loggingexceptionhandler, microsoft.practices.enterpriselibrary.exceptionhandling.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" logcategory="general" eventid="100" severity="error" title="services" formattertype="microsoft.practices.enterpriselibrary.exceptionhandling.textexceptionformatter, microsoft.practices.enterpriselibrary.exceptionhandling" priority="0" /> </exceptionhandlers> </add> </exceptiontypes> </add> <add name="log , notify"> <exceptiontypes> <add name="all exceptions" type="system.exception, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" posthandlingaction="none"> <exceptionhandlers> <add name="logging exception handler" type="microsoft.practices.enterpriselibrary.exceptionhandling.logging.loggingexceptionhandler, microsoft.practices.enterpriselibrary.exceptionhandling.logging, version=6.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" logcategory="general" eventid="100" severity="error" title="services" formattertype="microsoft.practices.enterpriselibrary.exceptionhandling.textexceptionformatter, microsoft.practices.enterpriselibrary.exceptionhandling" priority="0" /> </exceptionhandlers> </add> </exceptiontypes> </add> </exceptionpolicies> </exceptionhandling> </configuration>
the anwser need run console administrator once can create source.
i using this visual studio 2013 plugin editing config on easy way.
Comments
Post a Comment