summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
index a862dc1e6..633c4e1fb 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
@@ -34,6 +34,7 @@ namespace HandBrake.ApplicationServices.Interop
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrake.ApplicationServices.Interop.Model.Preview;
using HandBrake.ApplicationServices.Services.Logging;
+ using HandBrake.ApplicationServices.Services.Logging.Interfaces;
using HandBrake.ApplicationServices.Services.Logging.Model;
using Newtonsoft.Json;
@@ -55,6 +56,8 @@ namespace HandBrake.ApplicationServices.Interop
/// </summary>
private const double EncodePollIntervalMs = 250;
+ private readonly ILog log = LogService.GetLogger();
+
/// <summary>
/// The native handle to the HandBrake instance.
/// </summary>
@@ -502,7 +505,7 @@ namespace HandBrake.ApplicationServices.Interop
{
IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- LogHelper.LogMessage(new LogMessage(statusJson, LogMessageType.progressJson, LogLevel.debug));
+ this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);
if (state != null && state.State == NativeConstants.HB_STATE_SCANNING)
@@ -516,7 +519,7 @@ namespace HandBrake.ApplicationServices.Interop
{
var jsonMsg = HBFunctions.hb_get_title_set_json(this.hbHandle);
string scanJson = InteropUtilities.ToStringFromUtf8Ptr(jsonMsg);
- LogHelper.LogMessage(new LogMessage(scanJson, LogMessageType.scanJson, LogLevel.debug));
+ this.log.LogMessage(scanJson, LogMessageType.Progress, LogLevel.Trace);
this.titles = JsonConvert.DeserializeObject<JsonScanObject>(scanJson);
this.featureTitle = this.titles.MainFeature;
@@ -541,7 +544,7 @@ namespace HandBrake.ApplicationServices.Interop
IntPtr json = HBFunctions.hb_get_state_json(this.hbHandle);
string statusJson = Marshal.PtrToStringAnsi(json);
- LogHelper.LogMessage(new LogMessage(statusJson, LogMessageType.progressJson, LogLevel.debug));
+ this.log.LogMessage(statusJson, LogMessageType.Progress, LogLevel.Trace);
JsonState state = JsonConvert.DeserializeObject<JsonState>(statusJson);