Get rid of old/ugly logs
This commit is contained in:
parent
c027d84d62
commit
3682a80ff7
|
@ -20,11 +20,11 @@ defmodule Farmbot.Bootstrap.AuthTask do
|
|||
def handle_info(:refresh, old_timer) do
|
||||
auth_task = Application.get_env(:farmbot, :behaviour)[:authorization]
|
||||
{email, pass, server} = {fetch_email(), fetch_pass(), fetch_server()}
|
||||
Logger.busy(3, "refreshing token: #{auth_task} - #{email} - #{server}")
|
||||
# Logger.busy(3, "refreshing token: #{auth_task} - #{email} - #{server}")
|
||||
Farmbot.System.GPIO.Leds.led_status_err()
|
||||
case auth_task.authorize(email, pass, server) do
|
||||
{:ok, token} ->
|
||||
Logger.success(3, "Successful authorization: #{auth_task} - #{email} - #{server}")
|
||||
# Logger.success(3, "Successful authorization: #{auth_task} - #{email} - #{server}")
|
||||
ConfigStorage.update_config_value(:bool, "settings", "first_boot", false)
|
||||
ConfigStorage.update_config_value(:string, "authorization", "token", token)
|
||||
Farmbot.System.GPIO.Leds.led_status_ok()
|
||||
|
|
|
@ -36,7 +36,7 @@ defmodule Farmbot.Target.Network.Manager do
|
|||
def handle_info({:system_registry, :global, registry}, state) do
|
||||
ip = get_in(registry, [:state, :network_interface, state.interface, :ipv4_address])
|
||||
ntp_timer = if ip != state.ip_address do
|
||||
Logger.warn(3, "ip address changed on interface: #{state.interface}: #{ip}")
|
||||
# Logger.warn(3, "ip address changed on interface: #{state.interface}: #{ip}")
|
||||
maybe_cancel_and_reset_ntp_timer(state.ntp_timer)
|
||||
else
|
||||
nil
|
||||
|
@ -48,7 +48,7 @@ defmodule Farmbot.Target.Network.Manager do
|
|||
not_found_timer = cancel_not_found_timer(state.not_found_timer)
|
||||
{:noreply, %{state | ip_address: ip, connected: true, not_found_timer: not_found_timer, ntp_timer: ntp_timer}}
|
||||
else
|
||||
{:noreply, %{state | connected: false, ntp_timer: ntp_timer}}
|
||||
{:noreply, %{state | connected: false, ntp_timer: ntp_timer, ip_address: ip}}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ defmodule Farmbot.Target.Network.Ntp do
|
|||
|
||||
defp do_try_set_time(tries) when tries < 4 do
|
||||
# we try to set ntp time 3 times before giving up.
|
||||
Logger.busy 3, "Trying to set time (try #{tries})"
|
||||
# Logger.busy 3, "Trying to set time (try #{tries})"
|
||||
:os.cmd('ntpd -q -p 0.pool.ntp.org -p 1.pool.ntp.org')
|
||||
wait_for_time(tries)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue