summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--talpid_ipc/Cargo.toml1
-rw-r--r--talpid_ipc/src/lib.rs2
-rw-r--r--talpid_ipc/src/zmq_ipc.rs2
4 files changed, 6 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d6c53e865c..8a2318b595 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -297,6 +297,7 @@ version = "0.1.0"
dependencies = [
"assert_matches 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
"zmq 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/talpid_ipc/Cargo.toml b/talpid_ipc/Cargo.toml
index 369abcb128..12126ed3fc 100644
--- a/talpid_ipc/Cargo.toml
+++ b/talpid_ipc/Cargo.toml
@@ -8,6 +8,7 @@ description = "IPC client and server for talpid"
error-chain = "0.8"
serde = "0.9"
serde_json = "0.9"
+log = "0.3"
[target.'cfg(not(windows))'.dependencies]
zmq = "0.8"
diff --git a/talpid_ipc/src/lib.rs b/talpid_ipc/src/lib.rs
index 8698adb55c..8f82417d58 100644
--- a/talpid_ipc/src/lib.rs
+++ b/talpid_ipc/src/lib.rs
@@ -1,5 +1,7 @@
#[macro_use]
extern crate error_chain;
+#[macro_use]
+extern crate log;
extern crate serde;
diff --git a/talpid_ipc/src/zmq_ipc.rs b/talpid_ipc/src/zmq_ipc.rs
index f0111af254..aeecf2be41 100644
--- a/talpid_ipc/src/zmq_ipc.rs
+++ b/talpid_ipc/src/zmq_ipc.rs
@@ -23,6 +23,7 @@ pub fn start_new_server<T, F>(on_message: F) -> Result<IpcServerId>
let connection_string = format!("tcp://127.0.0.1:{}", port);
if let Ok(socket) = start_zmq_server(&connection_string) {
let _ = start_receive_loop(socket, on_message);
+ debug!("Listening on {}", connection_string);
return Ok(connection_string);
}
}
@@ -96,6 +97,7 @@ impl<T> IpcClient<T>
}
fn connect(&mut self) -> Result<()> {
+ debug!("Trying to establish connection to {}", self.server_id);
let ctx = zmq::Context::new();
let socket = ctx.socket(zmq::PUSH)
.chain_err(|| "Could not create ZeroMQ PUSH socket".to_owned())?;