summaryrefslogtreecommitdiff
path: root/core/examples/http_bench_json_ops.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/examples/http_bench_json_ops.rs')
-rw-r--r--core/examples/http_bench_json_ops.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs
index c24175747..bc96ce478 100644
--- a/core/examples/http_bench_json_ops.rs
+++ b/core/examples/http_bench_json_ops.rs
@@ -1,8 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-#[macro_use]
-extern crate log;
-
use deno_core::error::bad_resource_id;
use deno_core::error::AnyError;
use deno_core::AsyncRefCell;
@@ -135,7 +131,7 @@ fn op_listen(
_args: (),
_bufs: &mut [ZeroCopyBuf],
) -> Result<ResourceId, AnyError> {
- debug!("listen");
+ log::debug!("listen");
let addr = "127.0.0.1:4544".parse::<SocketAddr>().unwrap();
let std_listener = std::net::TcpListener::bind(&addr)?;
std_listener.set_nonblocking(true)?;
@@ -149,7 +145,7 @@ fn op_close(
args: ResourceId,
_buf: &mut [ZeroCopyBuf],
) -> Result<(), AnyError> {
- debug!("close rid={}", args.rid);
+ log::debug!("close rid={}", args.rid);
state
.resource_table
.close(args.rid)
@@ -162,7 +158,7 @@ async fn op_accept(
args: ResourceId,
_bufs: BufVec,
) -> Result<ResourceId, AnyError> {
- debug!("accept rid={}", args.rid);
+ log::debug!("accept rid={}", args.rid);
let listener = state
.borrow()
@@ -180,7 +176,7 @@ async fn op_read(
mut bufs: BufVec,
) -> Result<Value, AnyError> {
assert_eq!(bufs.len(), 1, "Invalid number of arguments");
- debug!("read rid={}", args.rid);
+ log::debug!("read rid={}", args.rid);
let stream = state
.borrow()
@@ -197,7 +193,7 @@ async fn op_write(
bufs: BufVec,
) -> Result<Value, AnyError> {
assert_eq!(bufs.len(), 1, "Invalid number of arguments");
- debug!("write rid={}", args.rid);
+ log::debug!("write rid={}", args.rid);
let stream = state
.borrow()