Skip to content

Commit

Permalink
2.3.2 add back support for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pofider committed Aug 10, 2022
1 parent a77f558 commit 27e4403
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions jsreport.Local/Internal/BinaryProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ internal async Task<ProcessOutput> ExecuteExe(string cmd, bool waitForExit = tru
private async Task<ProcessOutput> InnerExecute(string cmd, bool waitForExit = true)
{
var logs = "";
var errLogs = "";
var worker = new Process()
{
StartInfo = new ProcessStartInfo(_exePath)
Expand Down Expand Up @@ -158,7 +159,7 @@ private async Task<ProcessOutput> InnerExecute(string cmd, bool waitForExit = tr
{
if (!string.IsNullOrEmpty(e.Data))
{
logs += e.Data;
errLogs += e.Data;

if (ErrorDataReceived != null)
{
Expand Down Expand Up @@ -188,10 +189,10 @@ private async Task<ProcessOutput> InnerExecute(string cmd, bool waitForExit = tr
if (waitForExit)
{
await worker.WaitForExitAsync().ConfigureAwait(false);
return new ProcessOutput(worker, !worker.HasExited || worker.ExitCode != 0, _exePath + cmd, logs);
return new ProcessOutput(worker, !worker.HasExited || worker.ExitCode != 0, _exePath + cmd, errLogs == "" ? logs : (errLogs + "\n" + logs));
}

return new ProcessOutput(worker, false, _exePath + cmd, logs);
return new ProcessOutput(worker, false, _exePath + cmd, errLogs == "" ? logs : (errLogs + "\n" + logs));
}

private static byte[] ReadFully(Stream input)
Expand Down
2 changes: 1 addition & 1 deletion jsreport.Local/Internal/LocalUtilityReportingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal LocalUtilityReportingService(IReportingBinary binary, Configuration con
var metaFile = Path.Combine(_tempPath, $"meta{Guid.NewGuid().ToString()}");
var keepAliveParam = _keepAlive ? "--keepAlive" : "";

var output = await _binaryProcess.ExecuteExe($"render {keepAliveParam} --request=\"{reqFile}\" --out=\"{outFile}\" --meta=\"{metaFile}\"").ConfigureAwait(false);
var output = await _binaryProcess.ExecuteExe($"render {keepAliveParam} --verbose --request=\"{reqFile}\" --out=\"{outFile}\" --meta=\"{metaFile}\"").ConfigureAwait(false);
if (output.IsError)
{
throw new JsReportBinaryException("Error rendering report: " + output.Logs, output.Logs, output.Command);
Expand Down
6 changes: 3 additions & 3 deletions jsreport.Local/jsreport.Local.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageReleaseNotes>Release notes are at https://github.com/jsreport/jsreport-dotnet-local/releases</PackageReleaseNotes>
<Version>2.3.1</Version>
<Version>2.3.2</Version>
<Authors>Jan Blaha</Authors>
<Company>jsreport</Company>
<Product>jsreport</Product>
Expand All @@ -15,8 +15,8 @@
<RepositoryUrl>https://github.com/jsreport/jsreport-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>jsreport;report;pdf;excel</PackageTags>
<AssemblyVersion>2.3.1.0</AssemblyVersion>
<FileVersion>2.3.1.0</FileVersion>
<AssemblyVersion>2.3.2.0</AssemblyVersion>
<FileVersion>2.3.2.0</FileVersion>
<Description>pdf or excel reports rendering through local jsreport binary</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down

0 comments on commit 27e4403

Please sign in to comment.