Skip to content
Permalink
Browse files

Add logs to libsimpleservo C API

  • Loading branch information...
paulrouget committed Feb 6, 2019
1 parent 3994566 commit 1292db682445e07062f9583b0aca0a808d139a08
Showing with 5 additions and 0 deletions.
  1. +1 −0 Cargo.lock
  2. +1 −0 ports/libsimpleservo/capi/Cargo.toml
  3. +3 −0 ports/libsimpleservo/capi/src/lib.rs

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -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();

0 comments on commit 1292db6

Please sign in to comment.
You can’t perform that action at this time.