Skip to content

Commit

Permalink
Update nlog config;
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteLeon committed Jul 27, 2023
1 parent a654b37 commit 894be22
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\Uranus_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="UranusLog" fileName="${logDirectory}\Uranus_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="UranusDangerLog" fileName="${logDirectory}\Uranus_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="UranusLog" />
<logger name="*" minlevel="Info" writeTo="UranusLog" />
<logger name="*" minlevel="Warn" writeTo="UranusDangerLog" />
</rules>
</nlog>
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\ThemisNTLM_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="ThemisNTLMLog" fileName="${logDirectory}\ThemisNTLM_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="ThemisNTLMDangerLog" fileName="${logDirectory}\ThemisNTLM_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="ThemisNTLMLog" />
<logger name="*" minlevel="Info" writeTo="ThemisNTLMLog" />
<logger name="*" minlevel="Warn" writeTo="ThemisNTLMDangerLog" />
</rules>
</nlog>
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\Themis_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="ThemisLog" fileName="${logDirectory}\Themis_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="ThemisDangerLog" fileName="${logDirectory}\Themis_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="ThemisLog" />
<logger name="*" minlevel="Info" writeTo="ThemisLog" />
<logger name="*" minlevel="Warn" writeTo="ThemisDangerLog" />
</rules>
</nlog>
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\Hermes_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="HermesLog" fileName="${logDirectory}\Hermes_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="HermesDangerLog" fileName="${logDirectory}\Hermes_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="HermesLog" />
<logger name="*" minlevel="Info" writeTo="HermesLog" />
<logger name="*" minlevel="Warn" writeTo="HermesDangerLog" />
</rules>
</nlog>
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\Astra_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="AstraLog" fileName="${logDirectory}\Astra_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="AstraDangerLog" fileName="${logDirectory}\Astra_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="AstraLog" />
<logger name="*" minlevel="Info" writeTo="AstraLog" />
<logger name="*" minlevel="Warn" writeTo="AstraDangerLog" />
</rules>
</nlog>
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebServiceLog" fileName="${logDirectory}\Tethys_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="TethysLog" fileName="${logDirectory}\Tethys_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="TethysDangerLog" fileName="${logDirectory}\Tethys_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebServiceLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="TethysLog" />
<logger name="*" minlevel="Info" writeTo="TethysLog" />
<logger name="*" minlevel="Warn" writeTo="TethysDangerLog" />
</rules>
</nlog>
5 changes: 1 addition & 4 deletions src/WebUI/CleanMicroserviceSystem.Aphrodite.Host/NLog.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

<targets>
<target xsi:type="Console" name="Console" layout="${MicrosoftConsoleLayout}"/>
<target xsi:type="File" keepFileOpen="true" name="WebApplicationLog" fileName="${logDirectory}\WebApplication_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="WebAppHostLog" fileName="${logDirectory}\WebAppHost_Log_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
<target xsi:type="File" keepFileOpen="true" name="WebAppHostDangerLog" fileName="${logDirectory}\WebAppHost_DangerLog_${shortdate}.log"
layout="${longdate} ${event-properties:item=EventId_Id} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="WebApplicationLog" />
<logger name="Microsoft.AspNetCore.*" maxlevel="Info" final="true" />
<logger name="*" minlevel="Information" writeTo="WebAppHostLog" />
<logger name="*" minlevel="Info" writeTo="WebAppHostLog" />
<logger name="*" minlevel="Warn" writeTo="WebAppHostDangerLog" />
</rules>
</nlog>

0 comments on commit 894be22

Please sign in to comment.