summaryrefslogtreecommitdiff
path: root/src/rust/tor_log/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rust/tor_log/lib.rs')
-rw-r--r--src/rust/tor_log/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rust/tor_log/lib.rs b/src/rust/tor_log/lib.rs
new file mode 100644
index 0000000000..915910d003
--- /dev/null
+++ b/src/rust/tor_log/lib.rs
@@ -0,0 +1,17 @@
+//! Copyright (c) 2016-2017, The Tor Project, Inc. */
+//! See LICENSE for licensing information */
+
+//! Logging wrapper for Rust to utilize Tor's logger, found at
+//! src/common/log.c and src/common/torlog.h
+//!
+//! Exposes different interfaces depending on whether we are running in test
+//! or non-test mode. When testing, we use a no-op implementation,
+//! otherwise we link directly to C.
+
+extern crate libc;
+extern crate tor_allocate;
+
+mod tor_log;
+
+pub use tor_log::*;
+pub use tor_log::log::*;