Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Add better logging to the project and remove all print function calls. #82

Closed
2 tasks
zak-hassan opened this issue Mar 13, 2019 · 3 comments
Closed
2 tasks
Assignees
Milestone

Comments

@zak-hassan
Copy link
Contributor

zak-hassan commented Mar 13, 2019

Action items:

  • Decide on appropriate log level you should display
  • only log whats important. Currently we have print

Note: You can set log levels to the following:

  • Critical
  • Error
  • Warning
  • Info
  • Debug
@vpavlin
Copy link
Contributor

vpavlin commented Mar 13, 2019

Default for production should be probably Warning

For staging info

For development debug

Where are the prints? I only found 3 through the Github search

@zak-hassan zak-hassan added this to the MVP-1 milestone Mar 13, 2019
@zak-hassan
Copy link
Contributor Author

search and replace 'print' with 'logger'

anomaly_detector/events/anomaly_event.py:69:        print("Recording anomaly-event: {} {} {} {}".
anomaly_detector/events/anomaly_event.py:75:        print("data['false_anomaly'] is {} ".format(data['false_anomaly']))
anomaly_detector/fact_store/fact_store_api.py:22:                print("Creating tables")
anomaly_detector/fact_store/fact_store_api.py:25:            print("Exception occurred: {} ".format(e))
anomaly_detector/fact_store/fact_store_api.py:46:        print("Event ID: {}  recorded in events_store"
anomaly_detector/fact_store/fact_store_api.py:68:            print("Persisted ID: {} recorded in FStore".format(feedback.id))
anomaly_detector/storage/es_storage.py:46:            print(self.config.storage.ES_USE_SSL)
anomaly_detector/types/anomaly_status.py:2:import pprint
anomaly_detector/types/anomaly_status.py:17:        return pprint.pformat(self.value)
validation_data/REAMDE.md:56:This will kick of a training and inference loop, printing status and found anomlies to the terminal.
validation_data/generate_validation_data.py:83: print(len(data), "logs and corresponding labels saved to disk as verification_data.json and labels.pkl")

@zak-hassan
Copy link
Contributor Author

Complete.

@zak-hassan zak-hassan self-assigned this Nov 6, 2019
@zak-hassan zak-hassan reopened this Nov 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants