Difference between revisions of "Configuration Files/Logging.config"
(Created page with "===loggingConfiguration=== In this section the logging of the web service is configured for different types of information (errors, warnings, ...). It is important to specify...") |
|||
Line 1: | Line 1: | ||
− | + | The logging behavior can be configured for any messages of types | |
− | + | * Assertion | |
+ | * Debug | ||
+ | * Error | ||
+ | * Exception | ||
+ | * Service | ||
+ | * Warning | ||
+ | |||
+ | it is important that | ||
+ | |||
+ | specify a path the user executing the web service has all the required access rights. | ||
{{Attention|The categories (WARNING, ERROR, DEBUG, ...) set in the these section "categorySources" should not be renamed, as these names are used by the UBIK system!}} | {{Attention|The categories (WARNING, ERROR, DEBUG, ...) set in the these section "categorySources" should not be renamed, as these names are used by the UBIK system!}} |
Revision as of 11:52, 11 May 2015
The logging behavior can be configured for any messages of types
- Assertion
- Debug
- Error
- Exception
- Service
- Warning
it is important that
specify a path the user executing the web service has all the required access rights.
The categories (WARNING, ERROR, DEBUG, ...) set in the these section "categorySources" should not be renamed, as these names are used by the UBIK system! |
Further information about this section can be found in Logging Application Block Properties.
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="ASSERTION">
<listeners>
<add name="log.warning" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\warnings.log" footer="" formatter="Text Formatter SMALL" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment" rollInterval="None" traceOutputOptions="None"/>
<add name="log.error" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\error.log" footer="" formatter="Text FormatterFULL" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment" rollInterval="Week"/>
<add name="log.assertion" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\assertion.log" footer="" formatter="Text Formatter ASSERTION" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="log.debug" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\debug.log" footer="" formatter="Text Formatter SMALL" header="----------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="log.error.header" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\debug.error.header.log" footer="" formatter="Text Formatter TINY" header="-------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="servicelog" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="C:\UBIK_Logs\SericeLogs\Infopath.V2\infopath_service_v2.log" footer="" formatter="Text Formatter.SERVICE"/>
<add name="servicelog.rolling" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\service.build.V2.log" footer="" formatter="Text Formatter.SERVICE" header="########################################" rollFileExistsBehavior="Increment" rollSizeKB="1000" maxArchivedFiles="50"/>
</listeners>
<formatters>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="Timestamp: {timestamp}{newline} Message: {message}{newline} Category: {category}{newline} Priority: {priority}{newline} EventId: {eventid}{newline} Severity: {severity}{newline} Title:{title}{newline} Machine: {localMachine}{newline} App Domain: {localAppDomain}{newline} ProcessId: {localProcessId}{newline} Process Name: {localProcessName}{newline} Thread Name: {threadName}{newline} Win32 ThreadId:{win32ThreadId}{newline} Extended Properties: {dictionary({key} - {value}{newline})}" name="Text FormatterFULL"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {category} [{eventid}]{newline} {processName}{newline} {message}{newline}" name="Text Formatter ASSERTION"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {category} [{eventid}] {processName}{newline} {message}{newline} Extended Properties: {dictionary({key} - {value}{newline})}" name="Text Formatter SMALL"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp} {message}{newline}" name="Text Formatter TINY"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {processName}{newline} {newline} Parameter: {newline} ----------------{newline} {dictionary({key} - {value}{newline})} {newline} Result:{newline} ----------------{newline} {message}{newline} " name="Text Formatter.SERVICE"/>
</formatters>
<categorySources>
<add switchValue="All" name="ASSERTION">
<listeners>
<add name="log.assertion"/>
</listeners>
</add>
<add switchValue="All" name="WARNING">
<listeners>
<add name="log.warning"/>
</listeners>
</add>
<add switchValue="All" name="ERROR">
<listeners>
<add name="log.error.header"/>
</listeners>
</add>
<add switchValue="All" name="DEBUG">
<listeners>
<add name="log.debug"/>
</listeners>
</add>
<add switchValue="All" name="EXCEPTION">
<listeners>
<add name="log.error"/>
</listeners>
</add>
<add switchValue="All" name="SERVICE">
<listeners>
<add name="servicelog.rolling"/>
</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="log.error"/>
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
<listeners>
<add name="log.warning" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\warnings.log" footer="" formatter="Text Formatter SMALL" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment" rollInterval="None" traceOutputOptions="None"/>
<add name="log.error" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\error.log" footer="" formatter="Text FormatterFULL" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment" rollInterval="Week"/>
<add name="log.assertion" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\assertion.log" footer="" formatter="Text Formatter ASSERTION" header="-----------------------------------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="log.debug" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\debug.log" footer="" formatter="Text Formatter SMALL" header="----------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="log.error.header" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\debug.error.header.log" footer="" formatter="Text Formatter TINY" header="-------------------------------------" rollFileExistsBehavior="Increment"/>
<add name="servicelog" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="C:\UBIK_Logs\SericeLogs\Infopath.V2\infopath_service_v2.log" footer="" formatter="Text Formatter.SERVICE"/>
<add name="servicelog.rolling" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
fileName="\\UBIKFileServer\UBIK.Service.Logs\service.build.V2.log" footer="" formatter="Text Formatter.SERVICE" header="########################################" rollFileExistsBehavior="Increment" rollSizeKB="1000" maxArchivedFiles="50"/>
</listeners>
<formatters>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="Timestamp: {timestamp}{newline} Message: {message}{newline} Category: {category}{newline} Priority: {priority}{newline} EventId: {eventid}{newline} Severity: {severity}{newline} Title:{title}{newline} Machine: {localMachine}{newline} App Domain: {localAppDomain}{newline} ProcessId: {localProcessId}{newline} Process Name: {localProcessName}{newline} Thread Name: {threadName}{newline} Win32 ThreadId:{win32ThreadId}{newline} Extended Properties: {dictionary({key} - {value}{newline})}" name="Text FormatterFULL"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {category} [{eventid}]{newline} {processName}{newline} {message}{newline}" name="Text Formatter ASSERTION"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {category} [{eventid}] {processName}{newline} {message}{newline} Extended Properties: {dictionary({key} - {value}{newline})}" name="Text Formatter SMALL"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp} {message}{newline}" name="Text Formatter TINY"/>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="{timestamp}{newline} {processName}{newline} {newline} Parameter: {newline} ----------------{newline} {dictionary({key} - {value}{newline})} {newline} Result:{newline} ----------------{newline} {message}{newline} " name="Text Formatter.SERVICE"/>
</formatters>
<categorySources>
<add switchValue="All" name="ASSERTION">
<listeners>
<add name="log.assertion"/>
</listeners>
</add>
<add switchValue="All" name="WARNING">
<listeners>
<add name="log.warning"/>
</listeners>
</add>
<add switchValue="All" name="ERROR">
<listeners>
<add name="log.error.header"/>
</listeners>
</add>
<add switchValue="All" name="DEBUG">
<listeners>
<add name="log.debug"/>
</listeners>
</add>
<add switchValue="All" name="EXCEPTION">
<listeners>
<add name="log.error"/>
</listeners>
</add>
<add switchValue="All" name="SERVICE">
<listeners>
<add name="servicelog.rolling"/>
</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="log.error"/>
</listeners>
</errors>
</specialSources>
</loggingConfiguration>