-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MiYABiS
committed
Aug 11, 2017
1 parent
e8300bc
commit 8a70bd1
Showing
13 changed files
with
319 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,3 +196,4 @@ FakesAssemblies/ | |
*.opt | ||
*.bak | ||
*.bak | ||
*.jfm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<connectionStrings xdt:Transform="Replace"> | ||
<add name="db" connectionString="" providerName="" /> | ||
</connectionStrings> | ||
<userSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</userSettings> | ||
<applicationSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</applicationSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<connectionStrings xdt:Transform="Replace"> | ||
<add name="db" connectionString="" providerName="" /> | ||
</connectionStrings> | ||
<userSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</userSettings> | ||
<applicationSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</applicationSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
<connectionStrings xdt:Transform="Replace"> | ||
<add name="db" connectionString="" providerName="" /> | ||
</connectionStrings> | ||
<userSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</userSettings> | ||
<applicationSettings> | ||
<MocaCore.Test.My.MySettings xdt:Transform="Replace"> | ||
<add key="TestEnvironment" value="true"/> | ||
</MocaCore.Test.My.MySettings> | ||
</applicationSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
MocaCore.Test/My Project/AppConfigTransformAssemblyInfo.vb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
' プログラム要素が CLS (Common Language Specification) に準拠しているかどうかを示します | ||
<Assembly: System.CLSCompliant(True)> | ||
|
||
' The Apache Software Foundation log4net Logging Framework | ||
' When you use , please install the log4net from nuget. | ||
' log4net.config を log4net の設定ファイルとする | ||
<Assembly: log4net.Config.XmlConfigurator(ConfigFile:="log4net.config", Watch:=True)> | ||
|
||
' App.config Section Protection setting | ||
' When you use , please install the Moca.NETConfiguration from nuget. | ||
'<Assembly: Moca.Configuration.SectionProtection(Moca.Configuration.ProtectionProviderType.DPAPI, "Section Name")> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<log4net> | ||
|
||
<!-- コンソール出力用 (VS.NET 上 [出力] ウインドウへ) --> | ||
<appender name="DebugAppender" type="log4net.Appender.DebugAppender"> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<param name="ConversionPattern" value="@%-5level>> [%class.%method.%line] %message%newline"/> | ||
</layout> | ||
</appender> | ||
|
||
<!-- | ||
Fatal システム停止するような致命的な障害 | ||
Error システム停止はしないが、問題となる障害 | ||
Warn 障害ではない注意警告 | ||
Info 操作ログなどの情報 | ||
Debug 開発用のデバッグメッセージ | ||
--> | ||
<root> | ||
<level value="ALL" /> | ||
<appender-ref ref="DebugAppender" /> | ||
</root> | ||
</log4net> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<log4net> | ||
|
||
<!-- コンソール出力用 (VS.NET 上 [出力] ウインドウへ) --> | ||
<appender name="DebugAppender" type="log4net.Appender.DebugAppender"> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<param name="ConversionPattern" value="@%-5level>> [%class.%method.%line] %message%newline"/> | ||
</layout> | ||
</appender> | ||
|
||
<!-- | ||
Fatal システム停止するような致命的な障害 | ||
Error システム停止はしないが、問題となる障害 | ||
Warn 障害ではない注意警告 | ||
Info 操作ログなどの情報 | ||
Debug 開発用のデバッグメッセージ | ||
--> | ||
<root> | ||
<level value="ALL" /> | ||
<appender-ref ref="DebugAppender" /> | ||
</root> | ||
</log4net> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | ||
|
||
<appender xdt:Transform="RemoveAll" /> | ||
<root xdt:Transform="RemoveAll" /> | ||
|
||
<!-- ログファイル出力用(日付またはファイルのサイズ制約に基づいた多数のログを生成) --> | ||
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender" | ||
xdt:Transform="Insert"> | ||
<!--ログファイル名の先頭部分--> | ||
<param name="File" value="logs/log" /> | ||
<!-- 追加書き込み --> | ||
<param name="AppendToFile" value="true" /> | ||
<param name="MaxSizeRollBackups" value="30" /> | ||
<param name="MaximumFileSize" value="10MB" /> | ||
<!-- 日付ごとにファイルを作成することを指定 --> | ||
<param name="RollingStyle" value="date" /> | ||
<!-- ログ・ファイル名が固定ではないので“false”を指定 --> | ||
<param name="StaticLogFileName" value="false" /> | ||
<!-- ファイル名の日付部分 --> | ||
<param name="DatePattern" value='"_"yyyyMMdd".log"' /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<param name="ConversionPattern" value="%d [%t] [%-5p] [%C:%4L] - %m%n "/> | ||
</layout> | ||
<filter type="log4net.Filter.LevelRangeFilter"> | ||
<levelMin value="INFO" /> | ||
<levelMax value="FATAL" /> | ||
</filter> | ||
</appender> | ||
|
||
<!-- SQL Server 出力用 --> | ||
<appender name="ADONetAppender_SqlServer" type="log4net.Appender.AdoNetAppender" | ||
xdt:Transform="Insert"> | ||
<!-- DDL | ||
CREATE TABLE [tblLog4net]( | ||
[UserName] [varchar](100) NULL, | ||
[Date] [datetime] NULL, | ||
[Thread] [varchar](255) NULL, | ||
[Level] [varchar](50) NULL, | ||
[Class] [varchar](512) NULL, | ||
[Method] [varchar](512) NULL, | ||
[Message] [nvarchar](max) NULL, | ||
[Exception] [nvarchar](max) NULL | ||
) ON [PRIMARY] | ||
--> | ||
<bufferSize value="1" /> | ||
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
<!-- 接続文字列 --> | ||
<connectionString value="Data Source=.\SQLEXPRESS;Initial Catalog=AppDemo;Integrated Security=True" /> | ||
<!-- INSERT文を指定 --> | ||
<commandText value="INSERT INTO tblLog4net ([UserName],[Date],[Thread],[Level],[Class],[Method],[Message],[Exception]) VALUES (@username,@log_date, @thread, @log_level, @class, @method, @message, @exception)" /> | ||
|
||
<!-- カラム情報 --> | ||
<parameter> | ||
<!-- INSERT文に含まれるパラメータ --> | ||
<parameterName value="@username" /> | ||
<dbType value="String" /> | ||
<size value="100" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<!-- パターンを指定 --> | ||
<conversionPattern value="%username" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@log_date" /> | ||
<dbType value="DateTime" /> | ||
<layout type="log4net.Layout.RawTimeStampLayout" /> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@thread" /> | ||
<dbType value="String" /> | ||
<size value="255" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%t" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@log_level" /> | ||
<dbType value="String" /> | ||
<size value="50" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%level" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@class" /> | ||
<dbType value="String" /> | ||
<size value="512" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%class" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@method" /> | ||
<dbType value="String" /> | ||
<size value="512" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%method.%line" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@message" /> | ||
<dbType value="String" /> | ||
<size value="10000" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%message" /> | ||
</layout> | ||
</parameter> | ||
|
||
<parameter> | ||
<parameterName value="@exception" /> | ||
<dbType value="String" /> | ||
<size value="10000" /> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<conversionPattern value="%exception" /> | ||
</layout> | ||
</parameter> | ||
|
||
<filter type="log4net.Filter.LevelRangeFilter"> | ||
<levelMin value="INFO" /> | ||
<levelMax value="FATAL" /> | ||
</filter> | ||
</appender> | ||
|
||
<root xdt:Transform="Insert"> | ||
<level value="ALL" /> | ||
<appender-ref ref="RollingLogFileAppender" /> | ||
<!-- | ||
SQL Server へ出力する場合は下記を有効にする | ||
<appender-ref ref="ADONetAppender_SqlServer" /> | ||
--> | ||
</root> | ||
</log4net> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
すべてのファイルを表示し | ||
log4net.Debug.config および log4net.Release.config を編集してください。 | ||
ビルド時にソリューション構成によってそれぞれのファイルが出力されます。 | ||
--> | ||
<log4net> | ||
<!-- | ||
Fatal システム停止するような致命的な障害 | ||
Error システム停止はしないが、問題となる障害 | ||
Warn 障害ではない注意警告 | ||
Info 操作ログなどの情報 | ||
Debug 開発用のデバッグメッセージ | ||
--> | ||
|
||
<appender name="DebugAppender" type="log4net.Appender.DebugAppender"> | ||
<!-- コンソール出力用 (VS.NET 上 [出力] ウインドウへ) --> | ||
<layout type="log4net.Layout.PatternLayout"> | ||
<param name="ConversionPattern" value="@%-5level>> [%class.%method.%line] %message%newline"/> | ||
</layout> | ||
</appender> | ||
|
||
<root> | ||
<level value="ALL" /> | ||
<appender-ref ref="DebugAppender" /> | ||
</root> | ||
</log4net> |
Oops, something went wrong.