As per the instructions mentioned in the document, in my application, I have made required configuration for OPLOG but for some reason, it is not working as expected.
I made a few HTTP requests to my application nothing is logging. My code is:
RESOURCE_METHODS = ['GET','POST','DELETE']
ITEM_METHODS = ['GET','PATCH','DELETE']
X_DOMAINS = '*'
X_HEADERS = ['Authorization','If-Match','Access-Control-Expose-Headers','Content-Type','Pragma','Cache-Control']
X_EXPOSE_HEADERS = ['Origin', 'X-Requested-With', 'Content-Type', 'Accept']
OPLOG = True
OPLOG_ENDPOINT = 'oplogger'
DOMAIN = {
'user': {
'additional_lookup': {
'url': 'regex("[\w]+")',
'field': 'username',
},
'schema': {
'firstname': {
'type': 'string'
},
'lastname': {
'type': 'string'
},
'username': {
'type': 'string',
'unique': True
}
}
},
'oplog': {
'url': 'oplogger',
'datasource': {'source': 'oplog'}
}
}
Any idea how to solve this? Thank you in advance.
You might be hitting a known issue with the latest release of Eve. It's fixed in v0.8-dev (changelog), which is scheduled for release next month (give or take).
If you verify this is indeed your problem and are in a hurry, you can install the development version right away with:
pip install git+git://github.com/pyeve/eve.git
See the installation instructions for detailed instructions.