Logging level of a node

I wanted to activate the debug logging level to see the exact reason why a certain tx is not getting mined.

@hanssv.chain mentioned we should be able to see that by activating the debug logging level.

I use exactly the following config but it seems like there is absolutely nothing being logged except infos and warnings. what could be the reason?

peers: []
http:
  external:
    port: 3013
  internal:
    port: 3113
    listen_address: 0.0.0.0
    debug_endpoints: true

websocket:
  channel:
    listen_address: 0.0.0.0
    port: 3014

keys:
  peer_password: "top secret"
  dir: ./keys

chain:
  persist: true
  hard_forks:
    "1": 0
    "2": 2
    "3": 4

mining:
  autostart: true
  beneficiary: "ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo"
  expected_mine_rate: 4000
  micro_block_cycle: 1000
  cuckoo:
    miner:
      executable: mean15-generic
      extra_args: ""
      edge_bits: 15

fork_management:
  network_id: ae_devnet

logging:
  level: debug

Correct - Creation of ContractTx (Java-SDK) - #29 by hanssv.chain

I did even explain exactly how to do it, but let’s repeat ourselves here, just add the following to your configuration:

logging:
  level: debug

Yep and that’s exactly my problem. If you look into the config (scroll down to bottom) I added the logging property. But the node doesn’t log any debug information for some reason :pensive:

Can anybody help here? (I am using the config that I mentioned in the initial post of this thread)

Logging level is set to debug but I cannot see any debug messages in the logs.

Any error messages when you (re-)start the node?

And you are sure the config is picked up? If you make an intentional error, the node should not start…

I can’t see any errors. This is the output I get when starting the node:

node_1      | Exec: /home/aeternity/node/erts-9.3.3/bin/erlexec -boot /home/aeternity/node/releases/3.0.1/aeternity -mode embedded -boot_var ERTS_LIB_DIR /home/aeternity/node/lib -config /home/aeternity/node/releases/3.0.1/sys.config -args_file /home/aeternity/node
/releases/3.0.1/vm.args -pa -- console -noshell -noinput -aecore expected_mine_rate 15000 -aehttp enable_debug_endpoints true
node_1      | Root: /home/aeternity/node
node_1      | /home/aeternity/node
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Setup running ...
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Directories verified. Res = ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Setup phase 100
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Reading config file /home/aeternity/aeternity.yaml
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      |     validation: "/home/aeternity/aeternity.yaml"
node_1      |     result: [{ok,#{<<"chain">> =>
node_1      |                        #{<<"hard_forks">> =>
node_1      |                              #{<<"1">> => 0,<<"2">> => 2,<<"3">> => 4},
node_1      |                          <<"persist">> => true},
node_1      |                    <<"fork_management">> =>
node_1      |                        #{<<"network_id">> => <<"ae_devnet">>},
node_1      |                    <<"http">> =>
node_1      |                        #{<<"external">> => #{<<"port">> => 3013},
node_1      |                          <<"internal">> =>
node_1      |                              #{<<"debug_endpoints">> => true,
node_1      |                                <<"listen_address">> => <<"0.0.0.0">>,
node_1      |                                <<"port">> => 3113}},
node_1      |                    <<"keys">> =>
node_1      |                        #{<<"dir">> => <<"./keys">>,
node_1      |                          <<"peer_password">> => <<"top secret">>},
node_1      |                    <<"logging">> => #{<<"level">> => <<"debug">>},
node_1      |                    <<"mining">> =>
node_1      |                        #{<<"autostart">> => true,
node_1      |                          <<"beneficiary">> =>
node_1      |                              <<"ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo">>,
node_1      |                          <<"cuckoo">> =>
node_1      |                              #{<<"miner">> =>
node_1      |                                    #{<<"edge_bits">> => 15,
node_1      |                                      <<"executable">> => <<"mean15-generic">>,
node_1      |                                      <<"extra_args">> => <<>>}},
node_1      |                          <<"expected_mine_rate">> => 4000,
node_1      |                          <<"micro_block_cycle">> => 1000},
node_1      |                    <<"peers">> => [],
node_1      |                    <<"websocket">> =>
node_1      |                        #{<<"channel">> =>
node_1      |                              #{<<"listen_address">> => <<"0.0.0.0">>,
node_1      |                                <<"port">> => 3014}}}}]
node_1      | setenv K=autostart, V=true
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Set config (aeutils): '$user_config' = [{<<"chain">>,
node_1      |                                          [{<<"hard_forks">>,
node_1      |                                            [{<<"1">>,0},
node_1      |                                             {<<"2">>,2},
node_1      |                                             {<<"3">>,4}]},
node_1      |                                           {<<"persist">>,true}]},
node_1      |                                         {<<"fork_management">>,
node_1      |                                          [{<<"network_id">>,<<"ae_devnet">>}]},
node_1      |                                         {<<"http">>,
node_1      |                                          [{<<"external">>,[{<<"port">>,3013}]},
node_1      |                                           {<<"internal">>,
node_1      |                                            [{<<"debug_endpoints">>,true},
node_1      |                                             {<<"listen_address">>,
node_1      |                                              <<"0.0.0.0">>},
node_1      |                                             {<<"port">>,3113}]}]},
node_1      |                                         {<<"keys">>,
node_1      |                                          [{<<"dir">>,<<"./keys">>},
node_1      |                                           {<<"peer_password">>,
node_1      |                                            <<"top secret">>}]},
node_1      |                                         {<<"logging">>,
node_1      |                                          [{<<"level">>,<<"debug">>}]},
node_1      |                                         {<<"mining">>,
node_1      |                                          [{<<"autostart">>,true},
node_1      |                                           {<<"beneficiary">>,
node_1      |                                            <<"ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo">>},
node_1      |                                           {<<"cuckoo">>,
node_1      |                                            [{<<"miner">>,
node_1      |                                              [{<<"edge_bits">>,15},
node_1      |                                               {<<"executable">>,
node_1      |                                                <<"mean15-generic">>},
node_1      |                                               {<<"extra_args">>,<<>>}]}]},
node_1      |                                           {<<"expected_mine_rate">>,4000},
node_1      |                                           {<<"micro_block_cycle">>,1000}]},
node_1      |                                         {<<"peers">>,[]},
node_1      |                                         {<<"websocket">>,
node_1      |                                          [{<<"channel">>,
node_1      |                                            [{<<"listen_address">>,
node_1      |                                              <<"0.0.0.0">>},
node_1      |                                             {<<"port">>,3014}]}]}]
node_1      | setenv K=persist, V=true
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Set config (aeutils): '$user_map' = #{<<"chain">> =>
node_1      |                                           #{<<"hard_forks">> =>
node_1      |                                                 #{<<"1">> => 0,<<"2">> => 2,
node_1      |                                                   <<"3">> => 4},
node_1      |                                             <<"persist">> => true},
node_1      |                                       <<"fork_management">> =>
node_1      |                                           #{<<"network_id">> =>
node_1      |                                                 <<"ae_devnet">>},
node_1      |                                       <<"http">> =>
node_1      |                                           #{<<"external">> =>
node_1      |                                                 #{<<"port">> => 3013},
node_1      |                                             <<"internal">> =>
node_1      |                                                 #{<<"debug_endpoints">> =>
node_1      |                                                       true,
node_1      |                                                   <<"listen_address">> =>
node_1      |                                                       <<"0.0.0.0">>,
node_1      |                                                   <<"port">> => 3113}},
node_1      |                                       <<"keys">> =>
node_1      |                                           #{<<"dir">> => <<"./keys">>,
node_1      |                                             <<"peer_password">> =>
node_1      |                                                 <<"top secret">>},
node_1      |                                       <<"logging">> =>
node_1      |                                           #{<<"level">> => <<"debug">>},
node_1      |                                       <<"mining">> =>
node_1      |                                           #{<<"autostart">> => true,
node_1      |                                             <<"beneficiary">> =>
node_1      |                                                 <<"ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo">>,
node_1      |                                             <<"cuckoo">> =>
node_1      |                                                 #{<<"miner">> =>
node_1      |                                                       #{<<"edge_bits">> => 15,
node_1      |                                                         <<"executable">> =>
node_1      |                                                             <<"mean15-generic">>,
node_1      |                                                         <<"extra_args">> =>
node_1      |                                                             <<>>}},
node_1      |                                             <<"expected_mine_rate">> => 4000,
node_1      |                                             <<"micro_block_cycle">> => 1000},
node_1      |                                       <<"peers">> => [],
node_1      |                                       <<"websocket">> =>
node_1      |                                           #{<<"channel">> =>
node_1      |                                                 #{<<"listen_address">> =>
node_1      |                                                       <<"0.0.0.0">>,
node_1      |                                                   <<"port">> => 3014}}}
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aeu_env:read_config()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Setup phase 110
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aecore_app:check_env()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aec_dev_reward:ensure_env()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aehttp_app:check_env()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aec_hard_forks:check_env()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | aec_mining:check_env()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:08 ===
node_1      | Setup phase 200
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:09 ===
node_1      | aec_db:check_db()-> ok
node_1      |
node_1      | =INFO REPORT==== 3-Jul-2019::21:21:09 ===
node_1      | Setup finished processing hooks (Mode=normal)...
node_1      | 21:21:09.413 [info] Application lager started on node aeternity@localhost
node_1      | 21:21:09.413 [info] Application enacl started on node aeternity@localhost
node_1      | 21:21:09.414 [info] Application aeminer started on node aeternity@localhost
node_1      | 21:21:09.414 [info] Application runtime_tools started on node aeternity@localhost
node_1      | 21:21:09.414 [info] Application eper started on node aeternity@localhost
node_1      | 21:21:09.415 [info] Application jobs started on node aeternity@localhost
node_1      | 21:21:09.417 [info] Starting reporters with [{subscribers,[{select,{[{{[ae,epoch|'_'],counter,enabled},[],['$_']},{{[ae,epoch|'_'],gauge,enabled},[],['$_']}],aec_metrics_main,[value],default,true}},{select,{[{{[ae,epoch|'_'],'$1',enabled},[{'=/=','$1'
,counter},{'=/=','$1',gauge}],['$_']}],aec_metrics_main,default,default,true}}]}]
node_1      | 21:21:09.423 [info] Application exometer_core started on node aeternity@localhost
node_1      | 21:21:09.425 [info] Application yamerl started on node aeternity@localhost
node_1      | 21:21:09.425 [info] Application hex2bin started on node aeternity@localhost
node_1      | 21:21:09.426 [info] Application sha3 started on node aeternity@localhost
node_1      | 21:21:09.426 [info] Application enoise started on node aeternity@localhost
node_1      | 21:21:09.426 [info] Application inet_cidr started on node aeternity@localhost
node_1      | 21:21:09.426 [info] Application inet_ext started on node aeternity@localhost
node_1      | 21:21:09.427 [info] Application xmerl started on node aeternity@localhost
node_1      | 21:21:09.428 [info] Application rand_compat started on node aeternity@localhost
node_1      | 21:21:09.429 [info] Application ssl started on node aeternity@localhost
node_1      | 21:21:09.429 [info] Application lhttpc started on node aeternity@localhost
node_1      | 21:21:09.429 [info] Application nat started on node aeternity@localhost
node_1      | 21:21:09.429 [info] Application jsx started on node aeternity@localhost
node_1      | 21:21:09.429 [info] Application eblake2 started on node aeternity@localhost
node_1      | 21:21:09.430 [info] Application base58 started on node aeternity@localhost
node_1      | 21:21:09.430 [info] Application aeserialization started on node aeternity@localhost
node_1      | 21:21:09.430 [info] Application getopt started on node aeternity@localhost
node_1      | 21:21:09.433 [info] Starting aecore node
node_1      | 21:21:09.447 [info] Loaded empty persisted chain
node_1      | 21:21:09.450 [info] Initializing keys manager
node_1      | 21:21:09.493 [info] aec_peers started for "pp_HdcpgTX...EcSyF7X"
node_1      | 21:21:10.030 [warning] lager_error_logger_h dropped 199 messages in the last second that exceeded the limit of 50 messages/sec

Ah, you expect the debug logging to end up in the console? Unfortunately that won’t work, there would be too much logging and the console is too slow to cope with that. The console stays at info level.

Look in log/aeternity.log it should contain the debug messages you are looking for.

1 Like

Yep I have expected that :sweat_smile:

Thanks for clarifying!