Logging level (#38)

* Set logging levels in Makefile using -DRAY_COMMON_LOG_LEVEL=level

* Lower level of some LOG_ERROR messages, log the name of the table operation on failure

* Address rest of Robert's comments

* Fix spurious log message
This commit is contained in:
Stephanie Wang
2016-11-15 20:33:29 -08:00
committed by Robert Nishihara
parent 986ed5c9e8
commit 7babe0d22f
14 changed files with 123 additions and 75 deletions
+3 -2
View File
@@ -61,11 +61,11 @@ int create_buffer(int64_t size) {
return -1;
}
if (unlink(file_name) != 0) {
LOG_ERR("unlink error");
LOG_ERROR("unlink error");
return -1;
}
if (ftruncate(fd, (off_t) size) != 0) {
LOG_ERR("ftruncate error");
LOG_ERROR("ftruncate error");
return -1;
}
return fd;
@@ -78,6 +78,7 @@ void *fake_mmap(size_t size) {
size += sizeof(size_t);
int fd = create_buffer(size);
CHECKM(fd >= 0, "Failed to create buffer during mmap");
void *pointer = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (pointer == MAP_FAILED) {
return pointer;