how to output the application log in heroku (go application) - go

there is an application on Go that is hosted on heroku, I don't understand why what I output to fmt.Println() doesn't get into the logs, I look at the logs through the heroku logs -t command.
Another question is, if my application asks me to enter certain data into the console at startup, is it possible to do this?

Related

HEROKU logs - tail react application

HEROKU logs. That only shows me about 100 lines. Is there not a way to see complete logs for our application on HEROKU?
from heroku logs help:
-n, --num=num number of lines to display
or using heroku web dashboard - logs addon

Kotlin/JS web app doesn't start on Heroku

When I start the app, I get error code H14: no web proccess running.
I've already seen this: Gradle java web app doesn't start on heroku
heroku, and I've tried to run the command, yet I get this error: couldn't find that process type (web).
What is going on?

Log messages are not available in Google App Script Executions [duplicate]

I deployed my Google App Script Webapp with the optionen execute the app as: User accessing the web app.
In the App Script Dashboard I can see the executions of the webapp and the logging. However I only see the logging when I (the owner of the app) executes it. When another user executes the webapp I only see the executions but I can not see the logging int the App Script Dashboard.
How can I also see the logging of the app independent of the user executing it?
You have two ways of seeing the executions:
Allow the other users to edit the script (if it is on developing mode), then you will be able to see all the executions from the Apps Script Dashboard.
You can link the script to a GCP project, and then you will be able to see the executions from the GCP Logs viewer. You can enter the GCP logs viewer from the script: View -> Stackdriver Logging
The issue is reported here. Consider adding a star (on the top left) for Google developers to prioritize the issue.
In the mean time, As mentioned in the previous answer, Switching GCP should work:
Switching Google cloud project
View Logs at View > Stackdriver Logging

How to run a console command on a Heroku app through their REST API?

I need to programmatically execute a command on a Heroku app that I created used their REST API. From my console, I'd regularly do it like so:
$ heroku run [command]
I'm looking for a REST API request like this one:
POST /apps/{app_id}/run
But I was unable to find it in on the docs and I just resign to acknowledge that's not implemented. It's too much of a default behavior.
I know I could just install the Heroku Toolbelt on the requester box, but I don't like that. I could also set an authenticated URL to fire the thing but that's also too much of a thing for a feature that's already there!
This is what you're looking for: https://devcenter.heroku.com/articles/platform-api-reference#dyno-create
Notice the example there -- you can specify a run type which will run the process as a one-off thing. This is exactly how the heroku run command works under the hood =)

Stuck OpenShift Application

My application hang up. Because of that I wanted to delete the application but it's not possible. OpenShift just shows me: "Unable to perform action on app object. Another operation is already running" when I want to delete the application from the web interface.
Unable to perform action on app object. Another operation is already running.
When I check the status of my application then it is unknown. It shows "unknown" for my Tomcat server and also for my database server.
What can I do now to get my app back to live?
It looks like your error is caused by intermittent API failures on OpenShift, so there is nothing that you can do (except you work for OpenShift).
You can check the OpenShift Online Status Page to see whether the API errors are still present. To receive the latest status updates you can also follow OpenShift Operations on Twitter or join this IRC Channel: #openshift on irc.freenode.net.
I think the problem will be resolved quickly.
This may be caused by Tomcat running out of memory. Try rhc app force-stop -a [your_app] in the rhc command line tools. This should kill all running threads in your app even if it's out of memory. Then, if you want to restart the app, use rhc app start.
Source: https://help.openshift.com/hc/en-us/articles/202399040-How-to-restart-an-application-

Resources