mirror of
https://github.com/servo/servo.git
synced 2025-09-01 02:28:21 +01:00
Add logs to libsimpleservo C API
This commit is contained in:
parent
399456665c
commit
1292db6824
3 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,7 @@ bench = false
|
|||
[dependencies]
|
||||
simpleservo = { path = "../api" }
|
||||
log = "0.4"
|
||||
env_logger = "0.6"
|
||||
|
||||
[features]
|
||||
default = ["unstable", "default-except-unstable"]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use env_logger;
|
||||
use simpleservo::{self, gl_glue, EventLoopWaker, HostTrait, InitOptions, ServoGlue, SERVO};
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::mem;
|
||||
|
@ -68,6 +69,8 @@ fn init(
|
|||
wakeup: extern "C" fn(),
|
||||
callbacks: CHostCallbacks,
|
||||
) {
|
||||
crate::env_logger::init();
|
||||
|
||||
let args = unsafe { CStr::from_ptr(opts.args) };
|
||||
let args = args.to_str().map(|s| s.to_string()).ok();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue