mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Pipe GST_DEBUG output to its own log file on UWP.
This commit is contained in:
parent
261cf4f641
commit
47e6430d30
2 changed files with 5 additions and 2 deletions
|
@ -144,9 +144,8 @@ mod media_platform {
|
||||||
|
|
||||||
#[cfg(feature = "uwp")]
|
#[cfg(feature = "uwp")]
|
||||||
fn set_gstreamer_log_handler() {
|
fn set_gstreamer_log_handler() {
|
||||||
use gstreamer::{debug_add_log_function, debug_remove_default_log_function, DebugLevel};
|
use gstreamer::{debug_add_log_function, DebugLevel};
|
||||||
|
|
||||||
debug_remove_default_log_function();
|
|
||||||
debug_add_log_function(|cat, level, file, function, line, _, message| {
|
debug_add_log_function(|cat, level, file, function, line, _, message| {
|
||||||
let message = format!(
|
let message = format!(
|
||||||
"{:?} {:?} {:?}:{:?}:{:?} {:?}",
|
"{:?} {:?} {:?}:{:?}:{:?} {:?}",
|
||||||
|
|
|
@ -281,6 +281,10 @@ Servo::Servo(std::optional<hstring> initUrl, hstring args, GLsizei width,
|
||||||
sServo = this; // FIXME;
|
sServo = this; // FIXME;
|
||||||
|
|
||||||
auto current = ApplicationData::Current();
|
auto current = ApplicationData::Current();
|
||||||
|
auto gstLog = std::wstring(current.LocalFolder().Path()) + L"\\gst.log";
|
||||||
|
SetEnvironmentVariable(L"GST_DEBUG_FILE", gstLog.c_str());
|
||||||
|
// SetEnvironmentVariableA("GST_DEBUG", "4");
|
||||||
|
|
||||||
auto filePath = std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt";
|
auto filePath = std::wstring(current.LocalFolder().Path()) + L"\\stdout.txt";
|
||||||
sLogHandle =
|
sLogHandle =
|
||||||
CreateFile2(filePath.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr);
|
CreateFile2(filePath.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue