Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log to file #2

Open
ivanskodje opened this issue Nov 9, 2018 · 1 comment
Open

Log to file #2

ivanskodje opened this issue Nov 9, 2018 · 1 comment

Comments

@ivanskodje
Copy link

Jenkins returns OK (200) status even if it cannot find any jobs, perhaps due to lacking permissions.
The router should also log the response messages.

Webhook Router would benefit from being able to write logs to a file, instead of directly to the command prompt (assuming you run it manually). Otherwise we have no way of knowing (to my knowledge) what is going on with the webhook router.

@evenh
Copy link
Owner

evenh commented Nov 9, 2018

Logging could absolutely be improved. I don't know if all request should be logged (since it may contain sensitive data that the router should not know about). One could default to log erroneous HTTP response? Or introduce a configuration option to optionally log a specific routing.

I however disagree that it should log to a file. I am a supporter of The Twelve-Factor App school of thought. On logs:

[…]
A twelve-factor app never concerns itself with routing or storage of its output stream. It should not attempt to write to or manage logfiles. Instead, each running process writes its event stream, unbuffered, to stdout. During local development, the developer will view this stream in the foreground of their terminal to observe the app’s behavior.

In staging or production deploys, each process’ stream will be captured by the execution environment, collated together with all other streams from the app, and routed to one or more final destinations for viewing and long-term archival. These archival destinations are not visible to or configurable by the app, and instead are completely managed by the execution environment. Open-source log routers (such as Logplex and Fluentd) are available for this purpose.

The event stream for an app can be routed to a file, or watched via realtime tail in a terminal. Most significantly, the stream can be sent to a log indexing and analysis system such as Splunk, or a general-purpose data warehousing system such as Hadoop/Hive. […]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants