Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: shouldn't override the log.file after touch it #3011

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Sep 7, 2021

What problem does this PR solve?

Since #2990, the log service will write logs into log.dir + log.file.
But the log.file is overridden to log.dir + log.file after touch.
Then the log service will write logs into log.dir + log.dir + log.file.

Related changes

  • Need to cherry-pick to the rc/v0.100 release branch

Check List

Tests

  • Manual test

    • Test Case 1
      • ckb init -C /tmp/ckb-dir
      • ckb run -C /tmp/ckb-dir
      • cat /tmp/ckb-dir/data/logs/run.log
      • ckb miner -C /tmp/ckb-dir
      • cat /tmp/ckb-dir/data/logs/miner.log
    • Test Case 2
      • cd /tmp
      • ckb init -C ckb-dir
      • ckb run -C ckb-dir
      • cat ckb-dir/data/logs/run.log
      • ckb miner -C ckb-dir
      • cat ckb-dir/data/logs/miner.log
    • Test Case 3
      • cd /tmp
      • ckb init -C ckb-dir
      • cd ckb-dir
      • ckb run -C .
      • cat data/logs/run.log
      • ckb miner -C .
      • cat data/logs/miner.log

Release note

Title Only: Include only the PR title in the release note.

@yangby-cryptape yangby-cryptape marked this pull request as ready for review September 7, 2021 03:27
@yangby-cryptape yangby-cryptape requested a review from a team as a code owner September 7, 2021 03:27
@doitian
Copy link
Member

doitian commented Sep 7, 2021

bors r=doitian,driftluo

@bors
Copy link
Contributor

bors bot commented Sep 7, 2021

Build succeeded:

@bors bors bot merged commit 2beab53 into nervosnetwork:develop Sep 7, 2021
@yangby-cryptape yangby-cryptape deleted the pr/fix-log-path branch September 10, 2021 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants