-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
192 additions
and
14 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
client.exe |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
for /l %%i in (1,1,10) do start client.bat |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,63 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using log4net; | |||
using System.Reflection; | |||
|
|||
namespace MyWorld | |||
{ | |||
public class Log | |||
{ | |||
protected static ILog iLog; | |||
public static ILog logger | |||
{ | |||
get | |||
{ | |||
if (null == iLog) | |||
iLog = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | |||
return iLog; | |||
} | |||
} | |||
|
|||
public static void Debug(object message) | |||
{ | |||
logger.Debug(message); | |||
} | |||
|
|||
public static void Debug(object message, Exception exception) | |||
{ | |||
logger.Debug(message, exception); | |||
} | |||
|
|||
public static void Fatal(object message) | |||
{ | |||
logger.Fatal(message); | |||
} | |||
|
|||
public static void Fatal(object message, Exception exception) | |||
{ | |||
logger.Fatal(message, exception); | |||
} | |||
|
|||
public static void Info(object message) | |||
{ | |||
logger.Info(message); | |||
} | |||
|
|||
public static void Info(object message, Exception exception) | |||
{ | |||
logger.Info(message, exception); | |||
} | |||
|
|||
public static void Warn(object message) | |||
{ | |||
logger.Warn(message); | |||
} | |||
|
|||
public static void Warn(object message, Exception exception) | |||
{ | |||
logger.Warn(message, exception); | |||
} | |||
} | |||
} |
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
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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,6 @@ | |||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
<configuration> | <configuration> | ||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> | <startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> | |||
</startup> | |||
</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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
<?xml version="1.0"?> | |||
<log4net> | |||
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> | |||
<file value="log.log" /> | |||
<appendToFile value="true" /> | |||
<rollingStyle value="Size" /> | |||
<maxSizeRollBackups value="999999" /> | |||
<maximumFileSize value="100KB" /> | |||
<staticLogFileName value="true" /> | |||
<layout type="log4net.Layout.PatternLayout"> | |||
<conversionPattern value="%date [%thread] %-5level- %message - %logger [%property{NDC}] (%file:%line)%newline" /> | |||
</layout> | |||
</appender> | |||
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> | |||
<layout type="log4net.Layout.PatternLayout"> | |||
<conversionPattern value="%date [%thread] %-5level- %message - %logger [%property{NDC}] (%file:%line)%newline" /> | |||
</layout> | |||
</appender> | |||
<root> | |||
<appender-ref ref="RollingFileAppender" /> | |||
<appender-ref ref="ConsoleAppender" /> | |||
</root> | |||
</log4net> |