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

Add debug level for app logs #637

Closed
7 of 8 tasks
adri9valle opened this issue Apr 4, 2019 · 7 comments
Closed
7 of 8 tasks

Add debug level for app logs #637

adri9valle opened this issue Apr 4, 2019 · 7 comments
Assignees
Labels
request/operational Operational request

Comments

@adri9valle
Copy link
Contributor

adri9valle commented Apr 4, 2019

Currently, we have some useful logs for a production installation. Sometimes, the things don't go as well as we want and it's hard to debug properly, this ticket purpose is for adding an extra debug layer for our logs.

Also, is necessary to implement the way to edit the configuration parameters and apply them.

Tasks:

  • Add a new section in settings called configuration where will be possible to edit several options.
  • Create a new collection to save the configuration parameters.
  • Set the collection with initial data.
  • Settings > Configuration must show this setting and it must allow to edit it.
  • Add a new setting for config.conf called timeout to set the timeout for the API calls.
  • Add a new setting for config.conf, it should be something like this: #logs.level: info. Allowed values -> info, debug
  • Server side. Both success and failure situations must be logged when debug is enabled.
  • Client side. Main services must be verbose through the browser console when debug is enabled.
@adri9valle
Copy link
Contributor Author

Working on this branch: add-debug

@adri9valle
Copy link
Contributor Author

Update:

  • List the configuration
  • Check if is admin to show the configuration tab
  • Can edit data with input
  • Dropdown implemented to select options
  • Working on an endpoint to overwrite the configuration

@adri9valle
Copy link
Contributor Author

adri9valle commented May 6, 2019

Update 06.05.19:

Working on updating the configuration parameters I have found a problem when the config.conf is edited the changes are not applied until restart Splunk, this is normal, but if the config.conf is edited even if the changes are saved in the file, when you load the content received the previous changes because they are in memory yet.

Also, if the App was in a Splunk cluster, each App would have his own config.conf file.

These reasons make me take the decision to save the configuration in the local storage.

  • Created the new collection.
  • Working on creating the collection with initial data.

@adri9valle
Copy link
Contributor Author

Update 07.05.19 :

Today I have been mainly working on the backend and I have changed the way to get the configuration on the frontend:

  • Change the way to get the configuration on the frontend.
  • Check if the initial config is not in the kvStore if it is not then is created from a dictionary.
  • Create the endpoints in the backend to edit and get the configuration.
  • Trying to get the configuration in the backend to use the set parameters in the configuration.

@adri9valle
Copy link
Contributor Author

adri9valle commented May 8, 2019

Update 08.05.19 :

  • Deleted collection from kvStore, finally I read and write from config.conf directly
  • Apply the timeout set in the config.conf
  • Apply debug messages in the backend(in progress)

@adri9valle
Copy link
Contributor Author

adri9valle commented May 9, 2019

Update 09.05.19 :

  • Fix refreshLog function
  • Changed the log format in the backend
  • Implement in the front-end a new way to read the new log format
  • Add debug to all backend controllers and improved the existed logs
  • Enable trace-back in error only if debug mode is enabled
  • Show debug logs in the frontend only if the debug mode is enabled

@adri9valle
Copy link
Contributor Author

adri9valle commented May 22, 2019

Update 22/05/19

DONE:

  • Changed PR base to 3.10
  • Resolving conflicts

TODO:

  • Fix when saving a file.

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

No branches or pull requests

2 participants