logging lib
This commit is contained in:
@@ -46,7 +46,7 @@ std::string pBytes(double bytes, bool isKbytes) {
|
||||
ssize_t readFile2(const char* path, char* buffer, size_t maxlen) {
|
||||
int fd = open(path, O_RDONLY | O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
std::println("[readFile] Error reading {}", path);
|
||||
log(LOG::ERR, "readFile2", "Error reading {}", path);
|
||||
return 0;
|
||||
}
|
||||
ssize_t len = read(fd, buffer, maxlen - 1);
|
||||
|
||||
Reference in New Issue
Block a user