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

Feature/add error logging for graphql execution errors #120

Merged

Conversation

acousma82
Copy link
Contributor

Vorschlag zur Lösung von #67
Add GELF with Lograge as new standard logging method in production and development

  • In production we are using graylog so the rails logs should be formatted as gelf messages

Add Message to the Error Log if the GraphQL Server throws an Execution Error

  • If a graphql query execution fails the rails server doesn't know about it and doesn't log it
  • add method to log output of the graphql server if it returns a result hash with an "errors" key

#67

Sebastian Peter added 2 commits August 9, 2019 15:50
…d development

* In production we are using graylog so the rails logs should be formatted  as  gelf messages
…n Error

*  If a graphql query execution fails the rails server doesn't know about it and doesn't log it
* add method to log output of the graphql server if it returns a result hash with an "errors" key
@codeclimate
Copy link

codeclimate bot commented Aug 9, 2019

Code Climate has analyzed commit 80de592 and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3
Style 4

View more on Code Climate.

@acousma82 acousma82 merged commit dfa9091 into master Aug 9, 2019
@@ -83,7 +83,7 @@

# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
config.logger = GELF::Logger.new("localhost", 12219, "WAN", { :facility => "YOUR_APP_NAME" })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is missing the exchange of "YOUR_APP_NAME". Isn't there a environment variable with the app name, so that can be used here instead of a plain string?

@donni106 donni106 deleted the feature/add-error-logging-for-graphql-execution-errors branch May 20, 2020 11:11
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

Successfully merging this pull request may close these issues.

2 participants