Linux Wordpress App Service - Sending Supervisor STDOUT to Log Stream

spurro 60 Reputation points
2025-06-06T12:22:39+00:00

Stack: Wordpress

container image: mcr.microsoft.com/appsvc/wordpress-debian-php:8.3

I have some startup commands executing from Startup.sh, and I am sending all output to /dev/stdout and dev/stderr

Supervisor is running Startup.sh on the app service correctly, but the output never shows up in the Log Stream. I know the output exists, because I can see my logging statements in files that appear in /tmp/ such as:

/tmp/post-startup-script-stdout---supervisor-_di1pcyn.log

How do I get stdout/stderr to appear in the log stream during app service startup?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
{count} votes

Accepted answer
  1. Bhargavi Naragani 5,270 Reputation points Microsoft External Staff Moderator
    2025-06-09T08:23:27.5766667+00:00

    Hi @spurro,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    Linux Wordpress App Service - Sending Supervisor STDOUT to Log Stream

    Solution:

    thank you! This gave me enough information to figure out a solution. For anyone else who happens to come across this:

    I made a custom supervisord.conf file for Startup.sh to copy to /etc/supervisord.conf as noted above.

    "eform-update" is a new program entry I added to my custom supervisord.conf, after post-startup-script

    [program:eform-update]
    command=bash /home/dev/eformupdate.sh
    autostart=false
    autorestart=false
    startretries=0
    stdout_logfile=/dev/stdout
    stdout_logfile_maxbytes=0
    stderr_logfile=/dev/stderr
    stderr_logfile_maxbytes=0
    

    I set autostart=false and autorestart=false, along with the output redirections.

    The goal is for Startup.sh to update the supervisor config, reload the config without restarting, then starting my process which requires the logging output.

    In Startup.sh:

    cp /home/dev/supervisord.conf /etc/supervisord.conf
    supervisorctl update
    supervisorctl start eform-update
    

    The supervisor command "update" will update the config without fully restarting supervisor and allow any processes started after to use this new configuration. I then manually start my new process.

    Please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.