-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from Sitecore/rc/1.9.0
Rc/1.9.0
- Loading branch information
Showing
139 changed files
with
5,627 additions
and
550 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
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,17 @@ | ||
namespace SIM.Loggers | ||
{ | ||
public class EmptyLogger : ILogger | ||
{ | ||
public void Info(string message, bool includeSeverityLevel = true) | ||
{ | ||
} | ||
|
||
public void Warn(string message, bool includeSeverityLevel = true) | ||
{ | ||
} | ||
|
||
public void Error(string message, bool includeSeverityLevel = true) | ||
{ | ||
} | ||
} | ||
} |
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,11 @@ | ||
namespace SIM.Loggers | ||
{ | ||
public interface ILogger | ||
{ | ||
void Info(string message, bool includeSeverityLevel = true); | ||
|
||
void Warn(string message, bool includeSeverityLevel = true); | ||
|
||
void Error(string message, bool includeSeverityLevel = true); | ||
} | ||
} |
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,38 @@ | ||
using System; | ||
using Sitecore.Diagnostics.Base; | ||
|
||
namespace SIM.Loggers | ||
{ | ||
public class Logger : ILogger | ||
{ | ||
internal Action<string> _WriteLogMessage; | ||
|
||
public Logger(Action<string> writeLogMessage) | ||
{ | ||
Assert.ArgumentNotNull(writeLogMessage); | ||
this._WriteLogMessage = writeLogMessage; | ||
} | ||
|
||
public void Info(string message, bool includeSeverityLevel = true) | ||
{ | ||
DoWriteMessage(message, includeSeverityLevel, "INFO"); | ||
} | ||
|
||
public void Warn(string message, bool includeSeverityLevel = true) | ||
{ | ||
DoWriteMessage(message, includeSeverityLevel, "WARN"); | ||
} | ||
|
||
public void Error(string message, bool includeSeverityLevel = true) | ||
{ | ||
DoWriteMessage(message, includeSeverityLevel, "ERROR"); | ||
} | ||
|
||
private void DoWriteMessage(string message, bool includeSeverityLevel = true, string severity = "") | ||
{ | ||
string time = DateTime.Now.ToString("HH:mm:ss"); | ||
string text = includeSeverityLevel ? $"[{time}] {severity}: {message}" : $"[{time}] {message}"; | ||
this._WriteLogMessage(text); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.