|
|
@ -15,21 +15,13 @@ namespace Squidex.Domain.Apps.Entities.Apps.Templates |
|
|
public sealed class StringLogger : ILogger, ILogLine |
|
|
public sealed class StringLogger : ILogger, ILogLine |
|
|
{ |
|
|
{ |
|
|
private const int MaxActionLength = 40; |
|
|
private const int MaxActionLength = 40; |
|
|
private readonly ISemanticLog log; |
|
|
|
|
|
private readonly string template; |
|
|
|
|
|
private readonly List<string> lines = new List<string>(); |
|
|
private readonly List<string> lines = new List<string>(); |
|
|
private readonly List<string> errors = new List<string>(); |
|
|
private readonly List<string> errors = new List<string>(); |
|
|
private string startedLine = string.Empty; |
|
|
private string startedLine = string.Empty; |
|
|
|
|
|
|
|
|
public bool CanWriteToSameLine => false; |
|
|
public bool CanWriteToSameLine => false; |
|
|
|
|
|
|
|
|
public StringLogger(string template, ISemanticLog log) |
|
|
public void Flush(ISemanticLog log, string template) |
|
|
{ |
|
|
|
|
|
this.template = template; |
|
|
|
|
|
this.log = log; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
{ |
|
|
{ |
|
|
var mesage = string.Join('\n', lines); |
|
|
var mesage = string.Join('\n', lines); |
|
|
|
|
|
|
|
|
@ -50,6 +42,10 @@ namespace Squidex.Domain.Apps.Entities.Apps.Templates |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
|
{ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void StepStart(string message) |
|
|
public void StepStart(string message) |
|
|
{ |
|
|
{ |
|
|
if (message.Length > MaxActionLength - 3) |
|
|
if (message.Length > MaxActionLength - 3) |
|
|
|