1

I've been working on an Openshift app where the action hooks are written in Python.

The action hooks run, and work, but I can not get any output to display when I create the app. So when I run rhc app create ... the app is successfully created, but none of the status or debug messages I try to output ever display.

The code gets called like this:

b = library.Object()
b.build()

I have tried:

  • Adding a logging function to the object and adding b.showlog() to the code above.
  • print "Message with value: {0}".format(variable) from inside the build hook script
  • print >>sys.stderr, "Something bad happened: '{0}'...".format(return_code) from inside the build hook script

When I've written action hooks in bash, echo ... works fine.

This exact question doesn't seem to have been answered before, though there are questions that are superficially similar.

1 Answer 1

0

You don't get any action hook output during an app create. You will only see it during a "git push" when you update code. I would suggest having the output write to a log file in your ~/app-root/data directory instead so that you can view it later. Also, if you catch it at the right time, you can ssh into your application while it is being created the first time.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.