diff --git a/.github/workflows/benchmark-prs.yml b/.github/workflows/benchmark-prs.yml index f262a756af..811f882df4 100644 --- a/.github/workflows/benchmark-prs.yml +++ b/.github/workflows/benchmark-prs.yml @@ -47,7 +47,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging env: ANT_LOG: "all" with: @@ -71,7 +71,9 @@ jobs: - name: Start a client instance to compare memory usage shell: bash - run: ./target/release/ant --local file upload "./the-test-data.zip" + run: | + mkdir -p $CLIENT_DATA_PATH/logs + ./target/release/ant --local file upload "./the-test-data.zip" 2> $CLIENT_DATA_PATH/logs/ant.log env: ANT_LOG: "all" timeout-minutes: 5 diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index d460d8050a..2b87fd1cac 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -40,7 +40,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: start enable-evm-testnet: true @@ -56,7 +56,10 @@ jobs: run: | mkdir -p $RESTART_TEST_NODE_DATA_PATH ./target/release/antnode \ - --root-dir $RESTART_TEST_NODE_DATA_PATH --log-output-dest $RESTART_TEST_NODE_DATA_PATH --local --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & + --root-dir $RESTART_TEST_NODE_DATA_PATH \ + --log-output-dest $RESTART_TEST_NODE_DATA_PATH \ + --local \ + --rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" & sleep 10 env: ANT_LOG: "all" @@ -70,19 +73,26 @@ jobs: shell: bash - name: File upload - run: ./target/release/ant --local file upload --public "./the-test-data.zip" > ./upload_output 2>&1 + run: | + mkdir -p "${CLIENT_DATA_PATH}/logs" + ./target/release/ant \ + --local \ + file upload \ + --public "./the-test-data.zip" \ + > ./upload_output_second \ + 2> "${CLIENT_DATA_PATH}/logs/ant.log" env: ANT_LOG: "v" timeout-minutes: 15 - name: showing the upload terminal output - run: cat upload_output + run: cat upload_output_second shell: bash if: always() - name: parse address run: | - UPLOAD_ADDRESS=$(rg "At address: ([0-9a-f]*)" -o -r '$1' ./upload_output) + UPLOAD_ADDRESS=$(rg "At address: ([0-9a-f]*)" -o -r '$1' ./upload_output_second) echo "UPLOAD_ADDRESS=$UPLOAD_ADDRESS" >> $GITHUB_ENV shell: bash @@ -90,14 +100,6 @@ jobs: # Note rg will throw an error directly in case of failed to find a matching pattern. - name: Start a different client to upload the same file run: | - pwd - ls -l $ANT_DATA_PATH - mv $CLIENT_DATA_PATH $ANT_DATA_PATH/client_first - ls -l $ANT_DATA_PATH - ls -l $ANT_DATA_PATH/client_first - ls -l $ANT_DATA_PATH/client_first/logs - mkdir $ANT_DATA_PATH/client - ls -l $ANT_DATA_PATH ./target/release/ant --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1 rg 'All chunks already exist on the network.' ./upload_output_second -c --stats env: @@ -127,7 +129,9 @@ jobs: # Currently, there will be `Existing record found`, but NO `Existing record loaded` # Due to the failure on decryption (as different seed used) - name: Assert we've reloaded some chunks - run: rg "Existing record found" $RESTART_TEST_NODE_DATA_PATH + run: | + ls -al $RESTART_TEST_NODE_DATA_PATH + rg "Existing record found" $RESTART_TEST_NODE_DATA_PATH/antnode.log - name: Wait at least 1min for replication to happen # it is throttled to once/30s. run: sleep 60 @@ -180,7 +184,7 @@ jobs: - name: Stop the local network and upload logs if: always() - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: stop log_file_prefix: safe_test_logs_memcheck diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index dad69d3301..edc0e971e9 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -193,7 +193,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: start enable-evm-testnet: true @@ -315,8 +315,8 @@ jobs: [System.IO.File]::WriteAllBytes($fileName, $byteArray) # Run autonomi commands - ./target/release/ant --log-output-dest data-dir --local file upload "random_file_$i.bin" --public - ./target/release/ant --log-output-dest data-dir --local file upload "random_file_$i.bin" + ./target/release/ant --local file upload "random_file_$i.bin" --public + ./target/release/ant --local file upload "random_file_$i.bin" } env: ANT_LOG: "v" @@ -558,7 +558,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: start enable-evm-testnet: true @@ -705,7 +705,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: start enable-evm-testnet: true @@ -1014,7 +1014,7 @@ jobs: timeout-minutes: 30 - name: Start a local network - uses: maidsafe/ant-local-testnet-action@main + uses: jacderida/ant-local-testnet-action@chore-enable_logging with: action: start enable-evm-testnet: true diff --git a/ant-node/src/bin/antnode/main.rs b/ant-node/src/bin/antnode/main.rs index e4bf095c64..8421f4e02f 100644 --- a/ant-node/src/bin/antnode/main.rs +++ b/ant-node/src/bin/antnode/main.rs @@ -563,7 +563,6 @@ fn init_logging( }; if targets.is_empty() { - println!("Logging is not enabled"); return Ok(("stderr".to_string(), None, None)); } @@ -591,11 +590,6 @@ fn init_logging( log_builder.initialize()? }; - println!( - "Initialised logging. Logs will be output to {:?}", - output_dest - ); - Ok(( output_dest.to_string(), Some(reload_handle),