summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-03-21 00:07:04 +0000
committersr55 <[email protected]>2016-03-21 00:07:04 +0000
commit9e9167bb63f14f176913cc42521d45639512c15a (patch)
treec62ab72125805ee252ac96fdb6c78154c5c9d1fc /win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
parent78827728072257daadc8acb00bb24af7779c4d63 (diff)
WinGui: Add a Logging Service into the AppServices library. This does not depend on any 3rd party libraries and is off by default. It must be initialised by calling Enable() on the LogService class. Otherwise LogMessage does nothing.
Changed the Logging screen to a single panel in the WinGui. This will change back to separate Scan/Encode logs when we get libhb it's own processes. Added Auto-Scroll to the log window.
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
index fcc6d61da..7e1f95d3e 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakePresetService.cs
@@ -18,6 +18,7 @@ namespace HandBrake.ApplicationServices.Interop
using HandBrake.ApplicationServices.Interop.Helpers;
using HandBrake.ApplicationServices.Interop.Json.Presets;
using HandBrake.ApplicationServices.Services.Logging;
+ using HandBrake.ApplicationServices.Services.Logging.Interfaces;
using HandBrake.ApplicationServices.Services.Logging.Model;
using Newtonsoft.Json;
@@ -27,6 +28,8 @@ namespace HandBrake.ApplicationServices.Interop
/// </summary>
public class HandBrakePresetService
{
+ private static readonly ILog log = LogService.GetLogger();
+
/// <summary>
/// The get built in presets.
/// Requires an hb_init to have been invoked.
@@ -39,7 +42,7 @@ namespace HandBrake.ApplicationServices.Interop
IntPtr presets = HBFunctions.hb_presets_builtin_get_json();
string presetJson = Marshal.PtrToStringAnsi(presets);
- LogHelper.LogMessage(new LogMessage(presetJson, LogMessageType.progressJson, LogLevel.debug));
+ log.LogMessage(presetJson, LogMessageType.API, LogLevel.Debug);
IList<PresetCategory> presetList = JsonConvert.DeserializeObject<IList<PresetCategory>>(presetJson);
@@ -60,7 +63,7 @@ namespace HandBrake.ApplicationServices.Interop
IntPtr presetStringPointer = HBFunctions.hb_presets_read_file_json(InteropUtilities.ToUtf8PtrFromString(filename));
string presetJson = Marshal.PtrToStringAnsi(presetStringPointer);
- LogHelper.LogMessage(new LogMessage(presetJson, LogMessageType.libhb, LogLevel.debug));
+ log.LogMessage(presetJson, LogMessageType.API, LogLevel.Debug);
PresetTransportContainer preset = JsonConvert.DeserializeObject<PresetTransportContainer>(presetJson);