Skip to content

Commit 83f2454

Browse files
committed
steps on logs
1 parent cdd6351 commit 83f2454

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/bt_node_ex.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ defmodule BT.Node do
2323
end
2424

2525
def log_new(initparams) do
26-
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4)
26+
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4//1)
2727
IO.puts("-> #{time} #{__MODULE__} #{prettyprint(initparams)}")
2828
end
2929

3030
def log_success() do
31-
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4)
31+
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4//1)
3232
IO.puts("<- #{time} #{__MODULE__} success")
3333
end
3434

3535
def log_fail(fail_reason) do
36-
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4)
36+
time = String.slice("#{NaiveDateTime.utc_now()}", 0..-4//1)
3737
IO.puts("<- #{time} #{__MODULE__} fail #{inspect(fail_reason)}")
3838
end
3939

0 commit comments

Comments
 (0)