11defmodule BeaconApi.V1.NodeController do
22 use BeaconApi , :controller
33
4+ require Logger
45 alias BeaconApi.ApiSpec
56 alias BeaconApi.Utils
67 alias LambdaEthereumConsensus.Beacon.SyncBlocks
@@ -28,6 +29,7 @@ defmodule BeaconApi.V1.NodeController do
2829
2930 @ spec health ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
3031 def health ( conn , _params ) do
32+ Logger . info ( "NODE: Health check" )
3133 % { is_syncing: syncing? } = SyncBlocks . status ( )
3234 syncing_status = if syncing? , do: 206 , else: 200
3335
@@ -38,6 +40,7 @@ defmodule BeaconApi.V1.NodeController do
3840
3941 @ spec identity ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
4042 def identity ( conn , _params ) do
43+ Logger . info ( "NODE: Identity check" )
4144 metadata = Metadata . get_metadata ( ) |> Utils . to_json ( )
4245
4346 % {
@@ -61,6 +64,7 @@ defmodule BeaconApi.V1.NodeController do
6164
6265 @ spec version ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
6366 def version ( conn , _params ) do
67+ Logger . info ( "NODE: Version check" )
6468 version = Application . spec ( :lambda_ethereum_consensus ) [ :vsn ]
6569 arch = :erlang . system_info ( :system_architecture )
6670
@@ -74,6 +78,7 @@ defmodule BeaconApi.V1.NodeController do
7478
7579 @ spec syncing ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
7680 def syncing ( conn , _params ) do
81+ Logger . info ( "NODE: Syncing check" )
7782 % {
7883 is_syncing: is_syncing ,
7984 is_optimistic: is_optimistic ,
@@ -93,6 +98,7 @@ defmodule BeaconApi.V1.NodeController do
9398
9499 @ spec peers ( Plug.Conn . t ( ) , any ) :: Plug.Conn . t ( )
95100 def peers ( conn , _params ) do
101+ Logger . info ( "NODE: Peers check" )
96102 # TODO: (#1325) This is a stub.
97103 conn
98104 |> json ( % {
0 commit comments