Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Logging

Jose Celano edited this page May 5, 2015 · 2 revisions

Logging allows developers to track activities happening inside the code. You could enable logging for BlockCypher SDK. The instructions to enable logging, or any other configuration is described in Adding Configuration Tutorial

Logging modes will depend on mode, which represents if the call will be made to sandbox or live. Here are the options:

WARNING

Please note that logging with DEBUG level prints request, response and headers. Please make sure you use INFO, ERROR or WARN level for live environments, and use DEBUG with extreme caution, in sandbox mode.

Configurations

  • log.LogEnabled

    • Options : true, false
    • Enables Logging
  • log.FileName

    • When using a relative path, the log file is created relative to the .php file that is the entry point for this request. You can also provide an absolute path here
  • log.LogLevel

    • Logging level options are based on mode on which SDK is running. Please refer to Logging Levels section of this page to determine. Logging is most verbose in the DEBUG level and decreases as you proceed towards ERROR. WARN or ERROR would be a recommended option for live environments.

Logging Levels

  • Sandbox Mode
    • DEBUG, INFO, WARN, ERROR.
    • Please note that, DEBUG is only allowed in sandbox mode. It will throw a warning, and reduce the level to INFO if set in live mode.
  • Live Mode
    • INFO, WARN, ERROR
    • DEBUG mode is not allowed in live environment. It will throw a warning, and reduce the level to INFO if set in live mode.