Skip to content

Commit a17fe60

Browse files
committed
로그 설정 파일 이름 오류 수정.
로그 설정 파일에서 linux에서는 로그 설정 파일 이름에 .unix가 들어가는 것 수정하여 윈도우와 같게 했음
1 parent a69c22d commit a17fe60

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

SocketBase/Logging/LogFactoryBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ protected LogFactoryBase(string configFile)
3636

3737
if (Path.DirectorySeparatorChar != '\\')
3838
{
39-
configFile = Path.GetFileNameWithoutExtension(configFile) + ".unix" + Path.GetExtension(configFile);
39+
// 원본에서는 윈도우와 비윈도우 간에 로그 파일을 다르게 하기 위해서 아래처럼 했음
40+
//configFile = Path.GetFileNameWithoutExtension(configFile) + ".unix" + Path.GetExtension(configFile);
41+
configFile = Path.GetFileNameWithoutExtension(configFile) + Path.GetExtension(configFile);
4042
}
4143

4244

SocketBase/Logging/NLogLog.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void Fatal(object message)
229229
/// <param name="exception">The exception.</param>
230230
public void Fatal(object message, Exception exception)
231231
{
232-
throw new Exception("You have called a method that has not implemented this.");
232+
Log.Fatal($"msg:{message}, exception:{exception.ToString()}");
233233
}
234234

235235
/// <summary>
@@ -302,7 +302,7 @@ public void Info(object message)
302302
/// <param name="exception">The exception.</param>
303303
public void Info(object message, Exception exception)
304304
{
305-
throw new Exception("You have called a method that has not implemented this.");
305+
Log.Info($"msg:{message}, exception:{exception.ToString()}");
306306
}
307307

308308
/// <summary>
@@ -375,7 +375,7 @@ public void Warn(object message)
375375
/// <param name="exception">The exception.</param>
376376
public void Warn(object message, Exception exception)
377377
{
378-
throw new Exception("You have called a method that has not implemented this.");
378+
Log.Warn($"msg:{message}, exception:{exception.ToString()}");
379379
}
380380

381381
/// <summary>

SocketBase/Logging/NLogLogFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SuperSocket.SocketBase.Logging
77
public class NLogLogFactory : LogFactoryBase
88
{
99
public NLogLogFactory()
10-
: this("Nlog.config")
10+
: this("NLog.config")
1111
{
1212
}
1313

0 commit comments

Comments
 (0)