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

logging: Update to new logging API #29231

Closed
wants to merge 6 commits into from

Commits on Apr 28, 2024

  1. log: use error level for critical log messages

    As per doc/developer-notes#logging, LogError should be used for
    severe problems that require the node to shut down
    stickies-v authored and ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    3ebadba View commit details
    Browse the repository at this point in the history
  2. log: use warning level for non-critical log messages

    As per doc/developer-notes#logging, LogWarning should be used for
    severe problems that do not warrant shutting down the node
    stickies-v authored and ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    9f69289 View commit details
    Browse the repository at this point in the history
  3. scripted-diff: Switch various LogPrintLevel(*,Debug,*) to LogDebug()

    -BEGIN VERIFY SCRIPT-
    sed -i 's/LogPrintLevel(\(BCLog::[^,]*\), BCLog::Level::Debug,/LogDebug(\1,/' src/net_processing.cpp src/dbwrapper.cpp src/net.cpp src/node/txreconciliation.cpp src/validation.cpp
    -END VERIFY SCRIPT-
    ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    e5a1c6a View commit details
    Browse the repository at this point in the history
  4. scripted-diff: Switch various LogPrintLevel(*,Error,*) to LogError()

    Changes log output from:
    
      [net:error] Something bad happened
    
    to either
    
      [error] Something bad happened
    
    or, when -loglevelalways=1 is enabled:
    
      [all:error] Something bad happened
    
    -BEGIN VERIFY SCRIPT-
    sed -i 's/LogPrintLevel(\(BCLog::[^,]*\), BCLog::Level::Error, */LogError(/' src/net.cpp src/txdb.cpp src/txmempool.cpp
    -END VERIFY SCRIPT-
    ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    7e3fc9f View commit details
    Browse the repository at this point in the history
  5. scripted-diff: Switch various LogPrintLevel(*,Warning,*) to LogWarning()

    Changes log output from:
    
      [net:warning] Something problematic happened
    
    to either
    
      [warning] Something problematic happened
    
    or, when -loglevelalways=1 is enabled:
    
      [all:warning] Something problematic happened
    
    -BEGIN VERIFY SCRIPT-
    sed -i 's/LogPrintLevel(\(BCLog::[^,]*\), BCLog::Level::Warning, */LogWarning(/' src/net.cpp src/node/blockstorage.cpp src/validation.cpp
    -END VERIFY SCRIPT-
    ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    49b8a00 View commit details
    Browse the repository at this point in the history
  6. scripted-diff: Update init.cpp to use LogInfo and LogDebug

    -BEGIN VERIFY SCRIPT-
    sed -i 's/LogPrint(\(BCLog::[^,]*\),/LogDebug(\1,/' src/init.cpp
    sed -i 's/LogPrintf(/LogInfo(/' src/init.cpp
    -END VERIFY SCRIPT-
    ajtowns committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    fd97be4 View commit details
    Browse the repository at this point in the history