ソースを参照

update samples.

master
Savorboard 6年前
コミット
3086589e26
3個のファイルの変更8行の追加52行の削除
  1. +0
    -26
      samples/Sample.Kafka.MySql/nlog.config
  2. +8
    -0
      samples/Sample.RabbitMQ.MySql/appsettings.json
  3. +0
    -26
      samples/Sample.RabbitMQ.MySql/nlog.config

+ 0
- 26
samples/Sample.Kafka.MySql/nlog.config ファイルの表示

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="logs/internal-nlog.txt">

<variable name="myLogLayout"
value="---------------------------------------------------------------------------${newline}Date:${longdate} Level:${uppercase:${level}} User:${aspnet-user-identity}(${aspnet-request-ip}) Logger:${logger} URL:${aspnet-request-method} ${aspnet-request-url:IncludePort=true:IncludeQueryString=true} Action:${aspnet-mvc-action} ${newline}Message:${message} ${newline}${onexception:Exception:${exception:format=toString}}" />
<extensions>
<add assembly="NLog.Web.AspNetCore" />
</extensions>

<!-- define various log targets -->
<targets>
<!-- write logs to file -->
<target name="allfile" xsi:type="File" fileName="logs/cap-all-${shortdate}.log"
layout="${myLogLayout}" />
</targets>

<rules>
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Debug" writeTo="allfile" />
</rules>
</nlog>

+ 8
- 0
samples/Sample.RabbitMQ.MySql/appsettings.json ファイルの表示

@@ -0,0 +1,8 @@
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug"
}
}
}

+ 0
- 26
samples/Sample.RabbitMQ.MySql/nlog.config ファイルの表示

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="logs/internal-nlog.txt">

<variable name="myLogLayout"
value="---------------------------------------------------------------------------${newline}Date:${longdate} Level:${uppercase:${level}} User:${aspnet-user-identity}(${aspnet-request-ip}) Logger:${logger} URL:${aspnet-request-method} ${aspnet-request-url:IncludePort=true:IncludeQueryString=true} Action:${aspnet-mvc-action} ${newline}Message:${message} ${newline}${onexception:Exception:${exception:format=toString}}" />
<extensions>
<add assembly="NLog.Web.AspNetCore" />
</extensions>

<!-- define various log targets -->
<targets>
<!-- write logs to file -->
<target name="allfile" xsi:type="File" fileName="logs/cap-all-${shortdate}.log"
layout="${myLogLayout}" />
</targets>

<rules>
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Debug" writeTo="allfile" />
</rules>
</nlog>

読み込み中…
キャンセル
保存