If you can't find a solution to your problem, please contact us via the chat icon you'll find at the bottom right-hand side of your browser window. 

Please include the following information in your issue

  • Your platform (e.g. macOS, Debian wheezy x86, Ubuntu Precise x64, etc...);

  • The version of your Blackfire agent:

    • If you are using v1, run blackfire-agent -v  command;

    • If you are using v2, run blackfire version command;

  • The content of the Probe log file (read below);

  • The content of the Agent log file (read below);

PHP

  • The output of php -v  command.

  • The output of php -d display_startup_errors=on --ri blackfire  command.

Python

  • The output of pip show blackfire  

You can drag and drop files to the chat window.

Getting logs from Blackfire

PHP Probe logs

  1. Increase the Probe log level from your php.ini file, to the debug level by configuring it with blackfire.log_level=4   and blackfire.log_file=/tmp/blackfire.log  (refer to the Probe configuration for more information);

  2. ⚠️  Do not forget to restart the web server or PHP-FPM to reload the configuration;

  3. Profile your code again.

Python Probe logs

  1. Increase the Probe log level to debug by setting BLACKFIRE_LOG_LEVEL environment variable to 4
    BLACKFIRE_LOG_LEVEL=4 blackfire-python run python example.py  

  2. The default log file is python-probe.log .
    If the profile is running through Django, the log file is located in the same folder as the Django application where manage.py resides.
    If the profile is running via blackfire-python run or manually, the log file is located in the same folder as the profiled script.

  3. You may customize the location of the log file by setting BLACKFIRE_LOG_FILE environment variable. 

Agent logs

Note: this does not apply to Magento Cloud, which can only get the probe logs.

  1. Increase the Agent log level to debug by configuring it with log-level=4  (refer to the Agent configuration for more information);

  2. ⚠️  Do not forget to restart the Agent to reload its configuration;

  3. Profile your code again;

  4. Get the logs:

    • On Linux: default log files are in  /var/log/blackfire/agent.log ;

    • On macOS: default log files are in /usr/local/var/log/blackfire/agent.log ;

    • On Windows: simply copy/paste the console output;

    • On Heroku: log files are in /app/.blackfire/var/log/agent.log.

Agent logs using the Blackfire Docker image

  1. Increase the log level using the BLACKFIRE_LOG_LEVEL environment variable to 4 (debug level).
    Refer to the "Debugging the Agent" section of the Docker documentation.

  2. Restart the container;

  3. Profile your code again;

  4. Get the logs:

    • When using docker-compose, you may run docker-compose logs blackfire to display them;

    • When using only the docker command, run docker logs <your_container_id>

Logs from Platform.sh

  1. If needed, create a BLACKFIRE_LOG_FILE environment variable. This can be done from the platform command, from your Platform.sh web console, or within your .platform.app.yaml file.
    Set the value to e.g. /tmp/blackfire.log.

  2. Increase the verbosity to the debug level (level 4), by setting the BLACKFIRE_LOG_LEVEL environment variable;

  3. Redeploy;

  4. Profile again;

  5. Get the logs:

    • Open an SSH session to your Platform.sh container using platform ssh

    • Display the contents of your log file using cat /tmp/blackfire.log

Did this answer your question?