Skip to content

Commit

Permalink
로그 설정 파일 이름 오류 수정.
Browse files Browse the repository at this point in the history
로그 설정 파일에서 linux에서는 로그 설정 파일 이름에 .unix가 들어가는 것 수정하여 윈도우와 같게 했음
  • Loading branch information
jacking75 committed Apr 30, 2019
1 parent a69c22d commit a17fe60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion SocketBase/Logging/LogFactoryBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ protected LogFactoryBase(string configFile)

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


Expand Down
6 changes: 3 additions & 3 deletions SocketBase/Logging/NLogLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void Fatal(object message)
/// <param name="exception">The exception.</param>
public void Fatal(object message, Exception exception)
{
throw new Exception("You have called a method that has not implemented this.");
Log.Fatal($"msg:{message}, exception:{exception.ToString()}");
}

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

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

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion SocketBase/Logging/NLogLogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace SuperSocket.SocketBase.Logging
public class NLogLogFactory : LogFactoryBase
{
public NLogLogFactory()
: this("Nlog.config")
: this("NLog.config")
{
}

Expand Down

0 comments on commit a17fe60

Please sign in to comment.