From 50201c05b0e1a636c1523593788449c60583ba96 Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Fri, 1 Nov 2019 14:40:36 +0800 Subject: [PATCH] fixed example --- .../titan_elixir/apps/titan/lib/titan_cron_logger.ex | 10 +++++----- examples/titan_elixir/mix.lock | 3 ++- examples/titan_erlang/rebar.lock | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/titan_elixir/apps/titan/lib/titan_cron_logger.ex b/examples/titan_elixir/apps/titan/lib/titan_cron_logger.ex index a53064d..6f652f3 100644 --- a/examples/titan_elixir/apps/titan/lib/titan_cron_logger.ex +++ b/examples/titan_elixir/apps/titan/lib/titan_cron_logger.ex @@ -9,23 +9,23 @@ defmodule TitanCronLogger do def detach(), do: :telemetry.detach(:ecron_metrics) def handle_event([:ecron, :activate], %{action_ms: time}, %{name: name, mfa: mfa}, _config) do - Logger.info("Activate ecron #{name} #{mfa}} at #{time}") + Logger.info("Activate ecron #{inspect name} #{inspect mfa}} at #{inspect time}") end def handle_event([:ecron, :deactivate], %{action_ms: time}, %{name: name}, _config) do - Logger.info("Deactivate ecron #{name} at #{time}") + Logger.info("Deactivate ecron #{inspect name} at #{inspect time}") end def handle_event([:ecron, :delete], %{action_ms: time}, %{name: name}, _config) do - Logger.info("Delete ecron #{name} at #{time}") + Logger.info("Delete ecron #{inspect name} at #{inspect time}") end def handle_event([:ecron, :success], %{run_microsecond: ms, run_result: res}, %{name: name, mfa: mfa}, _config) do - Logger.info("Ecron #{name}(#{mfa}}) completed in #{ms}} microsecond. result is #{res}}") + Logger.info("Ecron #{inspect name}(#{inspect mfa}}) completed in #{inspect ms}} microsecond. result is #{inspect res}}") end def handle_event([:ecron, :failure], %{run_microsecond: ms, run_result: res}, %{name: name, mfa: mfa}, _config) do - Logger.error("Ecron #{name}(#{mfa}}) CRASH in #{ms}} microsecond. result is #{res}}") + Logger.error("Ecron #{inspect name}(#{inspect mfa}}) CRASH in #{inspect ms}} microsecond. result is #{inspect res}}") end end diff --git a/examples/titan_elixir/mix.lock b/examples/titan_elixir/mix.lock index 9e364bc..e51cd6e 100644 --- a/examples/titan_elixir/mix.lock +++ b/examples/titan_elixir/mix.lock @@ -1,3 +1,4 @@ %{ - "ecron": {:hex, :ecron, "0.3.0", "283d5ba96054f599b47733b26718c9a1092369009e25e58442ed19e0f4a194de", [:rebar3], [], "hexpm"}, + "ecron": {:hex, :ecron, "0.4.0", "fdf897b57ad235f4a033da41b2b61bb382d9cc4c9c63c4f694fe493612e8dc8f", [:rebar3], [{:telemetry, "~>0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm"}, + "telemetry": {:hex, :telemetry, "0.4.0", "8339bee3fa8b91cb84d14c2935f8ecf399ccd87301ad6da6b71c09553834b2ab", [:rebar3], [], "hexpm"}, } diff --git a/examples/titan_erlang/rebar.lock b/examples/titan_erlang/rebar.lock index ee1a95f..6509378 100644 --- a/examples/titan_erlang/rebar.lock +++ b/examples/titan_erlang/rebar.lock @@ -1,6 +1,8 @@ {"1.1.0", -[{<<"ecron">>,{pkg,<<"ecron">>,<<"0.3.0">>},0}]}. +[{<<"ecron">>,{pkg,<<"ecron">>,<<"0.4.0">>},0}, + {<<"telemetry">>,{pkg,<<"telemetry">>,<<"0.4.0">>},1}]}. [ {pkg_hash,[ - {<<"ecron">>, <<"283D5BA96054F599B47733B26718C9A1092369009E25E58442ED19E0F4A194DE">>}]} + {<<"ecron">>, <<"FDF897B57AD235F4A033DA41B2B61BB382D9CC4C9C63C4F694FE493612E8DC8F">>}, + {<<"telemetry">>, <<"8339BEE3FA8B91CB84D14C2935F8ECF399CCD87301AD6DA6B71C09553834B2AB">>}]} ].