Comments (6)
I'm thinking that the import logging
module maybe ideal.
I do see this being a little bit time consuming due to the number of lines I will need to add.
Is there a more efficient way of logging that I am unaware of?
https://docs.python.org/2/howto/logging.html
from moc-openstack-tools.
That would work, but I think we might want to use oslo_log instead since this is an Openstack-related project.
from moc-openstack-tools.
Okay I'll look into oslo_log!
This is what I'm thinking of using for logging guidlines:
https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels/2031209#2031209
This is what I'm using for documentation:
https://docs.openstack.org/developer/oslo.log/usage.html
from moc-openstack-tools.
@kamfonik for reference, is there any code you have written in oslo.log in the past?
from moc-openstack-tools.
I haven't personally used it but Mix and Match does I believe:
https://github.com/openstack/mixmatch/
from moc-openstack-tools.
In the Mix and Match implementation, it utilizes the config and I'm working on doing something very similar.
My implementation is under branch tomatsu-logging:
https://github.com/CCI-MOC/moc-openstack-tools/compare/master...ltomatsu:tomatsu-logging
For logging, I am replacing print statements such as
print "Creating project: {}".format(project.name)
to
LOG.info("Creating project: {}".format(project.name))
and
print "WARNING: cannot add additional users to project
{}from input:
{}".format(entry[15], entry[17])
to
LOG.warning("WARNING: cannot add additional users to project
{}form input:
{}".format(entry[15], entry[17]))
To have this implemented in both addusers.py and set-quotas.py, I am adding the configuration steps of oslo_log in config.py.
from moc-openstack-tools.
Related Issues (20)
- Email address checks should not be case sensitive
- Remove bare except blocks HOT 2
- Remove permanent resource requests
- Asking user to use osticketing system
- fix directory structure so that tests work
- user/project selection does not preserve row index
- new project email doesn't contain the name of the project HOT 6
- centralize exceptions into one file
- set search columns in config using column headers HOT 6
- HACKING.md suggests running a CentOS command on Ubuntu HOT 2
- Allow users to create project names with whitespace. HOT 1
- Remove set-quota requests from Google Sheets HOT 12
- Default quota setting is incorrect (?) HOT 4
- check-approved-requests.py partially fails. HOT 1
- addusers Kaizen OpenStack creds visible in config file HOT 11
- Request processing and emailing both depend on same cron cycle
- Automation of projects visible in request form HOT 1
- User account request form: Time stamps captured are incorrect HOT 10
- Resetting password is a manual process HOT 1
- Need to remove preceeding and trailing whitespace from user input HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moc-openstack-tools.