mirror of
https://github.com/wassname/ray.git
synced 2026-07-24 13:20:22 +08:00
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:
committed by
Robert Nishihara
parent
986ed5c9e8
commit
7babe0d22f
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user