SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Logger.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _SWC_FS_ERR(_error, _cmd, _tracker, _code)
 
#define _SWC_FS_FD_ERR(_error, _cmd, _smartfd, _tracker, _code)
 
#define SWC_FS_EXISTS_START(_path)
 
#define SWC_FS_EXISTS_FINISH(_error, _path, _state, _tracker)
 
#define SWC_FS_REMOVE_START(_path)
 
#define SWC_FS_REMOVE_FINISH(_error, _path, _tracker)
 
#define SWC_FS_LENGTH_START(_path)
 
#define SWC_FS_LENGTH_FINISH(_error, _path, _len, _tracker)
 
#define SWC_FS_MKDIRS_START(_path)
 
#define SWC_FS_MKDIRS_FINISH(_error, _path, _tracker)
 
#define SWC_FS_READDIR_START(_path)
 
#define SWC_FS_READDIR_FINISH(_error, _path, _sz, _tracker)
 
#define SWC_FS_RMDIR_START(_path)
 
#define SWC_FS_RMDIR_FINISH(_error, _path, _tracker)
 
#define SWC_FS_RENAME_START(_from, _to)
 
#define SWC_FS_RENAME_FINISH(_error, _from, _to, _tracker)
 
#define SWC_FS_READALL_START(_name)
 
#define SWC_FS_READALL_FINISH(_error, _name, _amount, _tracker)
 
#define SWC_FS_CREATE_START(_smartfd, _replication)
 
#define SWC_FS_CREATE_FINISH(_error, _smartfd, _open_fds, _tracker)
 
#define SWC_FS_OPEN_START(_smartfd)
 
#define SWC_FS_OPEN_FINISH(_error, _smartfd, _open_fds, _tracker)
 
#define SWC_FS_WRITE_START(_smartfd, _replication, _amount)
 
#define SWC_FS_WRITE_FINISH(_error, _smartfd, _tracker)
 
#define SWC_FS_READ_START(_smartfd, _amount)
 
#define SWC_FS_READ_FINISH(_error, _smartfd, _amount, _tracker)
 
#define SWC_FS_PREAD_START(_smartfd, _offset, _amount)
 
#define SWC_FS_PREAD_FINISH(_error, _smartfd, _amount, _tracker)
 
#define SWC_FS_COMBI_PREAD_START(_smartfd, _offset, _amount)
 
#define SWC_FS_COMBI_PREAD_FINISH(_error, _smartfd, _amount, _tracker)
 
#define SWC_FS_APPEND_START(_smartfd, _amount, _flags)
 
#define SWC_FS_APPEND_FINISH(_error, _smartfd, _amount, _tracker)
 
#define SWC_FS_SEEK_START(_smartfd, _offset)
 
#define SWC_FS_SEEK_FINISH(_error, _smartfd, _tracker)    _SWC_FS_FD_ERR(_error, "seek", _smartfd, _tracker, );
 
#define SWC_FS_FLUSH_START(_smartfd)
 
#define SWC_FS_FLUSH_FINISH(_error, _smartfd, _tracker)    _SWC_FS_FD_ERR(_error, "flush", _smartfd, _tracker, );
 
#define SWC_FS_SYNC_START(_smartfd)
 
#define SWC_FS_SYNC_FINISH(_error, _smartfd, _tracker)    _SWC_FS_FD_ERR(_error, "sync", _smartfd, _tracker, );
 
#define SWC_FS_CLOSE_START(_smartfd)
 
#define SWC_FS_CLOSE_FINISH(_error, _smartfd, _tracker)    _SWC_FS_FD_ERR(_error, "close", _smartfd, _tracker, );
 

Macro Definition Documentation

◆ _SWC_FS_ERR

#define _SWC_FS_ERR (   _error,
  _cmd,
  _tracker,
  _code 
)
Value:
((_error) ? LOG_ERROR : LOG_DEBUG), \
SWC_LOG_OSTREAM << _cmd; \
if(_error) Error::print(SWC_LOG_OSTREAM << ' ', _error); \
_code; \
); _tracker.stop(_error);

Definition at line 12 of file Logger.h.

◆ _SWC_FS_FD_ERR

#define _SWC_FS_FD_ERR (   _error,
  _cmd,
  _smartfd,
  _tracker,
  _code 
)
Value:
_SWC_FS_ERR(_error, _cmd, _tracker, \
_code; \
_smartfd->print(SWC_LOG_OSTREAM << ' '); \
);

Definition at line 21 of file Logger.h.

◆ SWC_FS_APPEND_FINISH

#define SWC_FS_APPEND_FINISH (   _error,
  _smartfd,
  _amount,
  _tracker 
)
Value:
_SWC_FS_FD_ERR(_error, "append", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " amt=" << _amount; \
);

Definition at line 223 of file Logger.h.

◆ SWC_FS_APPEND_START

#define SWC_FS_APPEND_START (   _smartfd,
  _amount,
  _flags 
)
Value:
_smartfd->print(SWC_LOG_OSTREAM \
<< "append amt=" << _amount << " flags=" << int(_flags) << ' '); \
);

Definition at line 217 of file Logger.h.

◆ SWC_FS_CLOSE_FINISH

#define SWC_FS_CLOSE_FINISH (   _error,
  _smartfd,
  _tracker 
)     _SWC_FS_FD_ERR(_error, "close", _smartfd, _tracker, );

Definition at line 268 of file Logger.h.

◆ SWC_FS_CLOSE_START

#define SWC_FS_CLOSE_START (   _smartfd)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "close "); \
);

Definition at line 263 of file Logger.h.

◆ SWC_FS_COMBI_PREAD_FINISH

#define SWC_FS_COMBI_PREAD_FINISH (   _error,
  _smartfd,
  _amount,
  _tracker 
)
Value:
_error && _error == Error::FS_EOF ? Error::OK : _error, \
"combi-pread", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " amt=" << _amount; \
if(_error == Error::FS_EOF) SWC_LOG_OSTREAM << "EOF"; \
);

Definition at line 207 of file Logger.h.

◆ SWC_FS_COMBI_PREAD_START

#define SWC_FS_COMBI_PREAD_START (   _smartfd,
  _offset,
  _amount 
)
Value:
_smartfd->print(SWC_LOG_OSTREAM \
<< "combi-pread offset=" << _offset << " amt=" << _amount << ' '); \
);

Definition at line 201 of file Logger.h.

◆ SWC_FS_CREATE_FINISH

#define SWC_FS_CREATE_FINISH (   _error,
  _smartfd,
  _open_fds,
  _tracker 
)
Value:
_SWC_FS_FD_ERR(_error, "create", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " open-fds=" << _open_fds; \
);

Definition at line 137 of file Logger.h.

◆ SWC_FS_CREATE_START

#define SWC_FS_CREATE_START (   _smartfd,
  _replication 
)
Value:
_smartfd->print( \
SWC_LOG_OSTREAM << "create replicas=" << int(_replication) << ' '); \
);

Definition at line 131 of file Logger.h.

◆ SWC_FS_EXISTS_FINISH

#define SWC_FS_EXISTS_FINISH (   _error,
  _path,
  _state,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "exists", _tracker, \
SWC_LOG_OSTREAM << " state=" << _state << " path='" << _path << '\''; \
);

Definition at line 36 of file Logger.h.

◆ SWC_FS_EXISTS_START

#define SWC_FS_EXISTS_START (   _path)
Value:
SWC_LOG_OSTREAM << "exists path='" << _path << '\''; \
);

Definition at line 31 of file Logger.h.

◆ SWC_FS_FLUSH_FINISH

#define SWC_FS_FLUSH_FINISH (   _error,
  _smartfd,
  _tracker 
)     _SWC_FS_FD_ERR(_error, "flush", _smartfd, _tracker, );

Definition at line 246 of file Logger.h.

◆ SWC_FS_FLUSH_START

#define SWC_FS_FLUSH_START (   _smartfd)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "flush "); \
);

Definition at line 241 of file Logger.h.

◆ SWC_FS_LENGTH_FINISH

#define SWC_FS_LENGTH_FINISH (   _error,
  _path,
  _len,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "length", _tracker, \
SWC_LOG_OSTREAM << " len=" << _len << " path='" << _path << '\''; \
);

Definition at line 60 of file Logger.h.

◆ SWC_FS_LENGTH_START

#define SWC_FS_LENGTH_START (   _path)
Value:
SWC_LOG_OSTREAM << "length path='" << _path << '\''; \
);

Definition at line 55 of file Logger.h.

◆ SWC_FS_MKDIRS_FINISH

#define SWC_FS_MKDIRS_FINISH (   _error,
  _path,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "mkdirs", _tracker, \
SWC_LOG_OSTREAM << " path='" << _path << '\''; \
);

Definition at line 72 of file Logger.h.

◆ SWC_FS_MKDIRS_START

#define SWC_FS_MKDIRS_START (   _path)
Value:
SWC_LOG_OSTREAM << "mkdirs path='" << _path << '\''; \
);

Definition at line 67 of file Logger.h.

◆ SWC_FS_OPEN_FINISH

#define SWC_FS_OPEN_FINISH (   _error,
  _smartfd,
  _open_fds,
  _tracker 
)
Value:
_SWC_FS_FD_ERR(_error, "open", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " open-fds=" << _open_fds; \
);

Definition at line 149 of file Logger.h.

◆ SWC_FS_OPEN_START

#define SWC_FS_OPEN_START (   _smartfd)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "open "); \
);

Definition at line 144 of file Logger.h.

◆ SWC_FS_PREAD_FINISH

#define SWC_FS_PREAD_FINISH (   _error,
  _smartfd,
  _amount,
  _tracker 
)
Value:
_error && _error == Error::FS_EOF ? Error::OK : _error, \
"pread", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " amt=" << _amount; \
if(_error == Error::FS_EOF) SWC_LOG_OSTREAM << "EOF"; \
);

Definition at line 191 of file Logger.h.

◆ SWC_FS_PREAD_START

#define SWC_FS_PREAD_START (   _smartfd,
  _offset,
  _amount 
)
Value:
_smartfd->print(SWC_LOG_OSTREAM \
<< "pread offset=" << _offset << " amt=" << _amount << ' '); \
);

Definition at line 185 of file Logger.h.

◆ SWC_FS_READ_FINISH

#define SWC_FS_READ_FINISH (   _error,
  _smartfd,
  _amount,
  _tracker 
)
Value:
_error && _error == Error::FS_EOF ? Error::OK : _error, \
"read", _smartfd, _tracker, \
SWC_LOG_OSTREAM << " amt=" << _amount; \
if(_error == Error::FS_EOF) SWC_LOG_OSTREAM << "EOF"; \
);

Definition at line 175 of file Logger.h.

◆ SWC_FS_READ_START

#define SWC_FS_READ_START (   _smartfd,
  _amount 
)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "read amt=" << _amount << ' '); \
);

Definition at line 170 of file Logger.h.

◆ SWC_FS_READALL_FINISH

#define SWC_FS_READALL_FINISH (   _error,
  _name,
  _amount,
  _tracker 
)
Value:
"readall", _tracker, \
SWC_LOG_OSTREAM << " file='" << _name << "' amt=" << _amount; \
);

Definition at line 120 of file Logger.h.

◆ SWC_FS_READALL_START

#define SWC_FS_READALL_START (   _name)
Value:
SWC_LOG_OSTREAM << "readall file='" << _name << '\''; \
);

Definition at line 115 of file Logger.h.

◆ SWC_FS_READDIR_FINISH

#define SWC_FS_READDIR_FINISH (   _error,
  _path,
  _sz,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "readdir", _tracker, \
SWC_LOG_OSTREAM << " sz=" << _sz << " path='" << _path << '\''; \
);

Definition at line 84 of file Logger.h.

◆ SWC_FS_READDIR_START

#define SWC_FS_READDIR_START (   _path)
Value:
SWC_LOG_OSTREAM << "readdir path='" << _path << '\''; \
);

Definition at line 79 of file Logger.h.

◆ SWC_FS_REMOVE_FINISH

#define SWC_FS_REMOVE_FINISH (   _error,
  _path,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "remove", _tracker, \
SWC_LOG_OSTREAM << " path='" << _path << '\''; \
);

Definition at line 48 of file Logger.h.

◆ SWC_FS_REMOVE_START

#define SWC_FS_REMOVE_START (   _path)
Value:
SWC_LOG_OSTREAM << "remove path='" << _path << '\''; \
);

Definition at line 43 of file Logger.h.

◆ SWC_FS_RENAME_FINISH

#define SWC_FS_RENAME_FINISH (   _error,
  _from,
  _to,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "rename", _tracker, \
SWC_LOG_OSTREAM << " '" << _from << "' to '" << _to << '\''; \
);

Definition at line 108 of file Logger.h.

◆ SWC_FS_RENAME_START

#define SWC_FS_RENAME_START (   _from,
  _to 
)
Value:
SWC_LOG_OSTREAM << "rename '" << _from << "' to '" << _to << '\''; \
);

Definition at line 103 of file Logger.h.

◆ SWC_FS_RMDIR_FINISH

#define SWC_FS_RMDIR_FINISH (   _error,
  _path,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "rmdir", _tracker, \
SWC_LOG_OSTREAM << " path='" << _path << '\''; \
);

Definition at line 96 of file Logger.h.

◆ SWC_FS_RMDIR_START

#define SWC_FS_RMDIR_START (   _path)
Value:
SWC_LOG_OSTREAM << "rmdir path='" << _path << '\''; \
);

Definition at line 91 of file Logger.h.

◆ SWC_FS_SEEK_FINISH

#define SWC_FS_SEEK_FINISH (   _error,
  _smartfd,
  _tracker 
)     _SWC_FS_FD_ERR(_error, "seek", _smartfd, _tracker, );

Definition at line 235 of file Logger.h.

◆ SWC_FS_SEEK_START

#define SWC_FS_SEEK_START (   _smartfd,
  _offset 
)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "seek offset=" << _offset << ' '); \
);

Definition at line 230 of file Logger.h.

◆ SWC_FS_SYNC_FINISH

#define SWC_FS_SYNC_FINISH (   _error,
  _smartfd,
  _tracker 
)     _SWC_FS_FD_ERR(_error, "sync", _smartfd, _tracker, );

Definition at line 257 of file Logger.h.

◆ SWC_FS_SYNC_START

#define SWC_FS_SYNC_START (   _smartfd)
Value:
_smartfd->print(SWC_LOG_OSTREAM << "sync "); \
);

Definition at line 252 of file Logger.h.

◆ SWC_FS_WRITE_FINISH

#define SWC_FS_WRITE_FINISH (   _error,
  _smartfd,
  _tracker 
)
Value:
_SWC_FS_ERR(_error, "write", _tracker, \
_smartfd->print(SWC_LOG_OSTREAM << ' '); \
);

Definition at line 163 of file Logger.h.

◆ SWC_FS_WRITE_START

#define SWC_FS_WRITE_START (   _smartfd,
  _replication,
  _amount 
)
Value:
_smartfd->print( \
SWC_LOG_OSTREAM << "write replicas=" << int(_replication) \
<< " amt=" << _amount << ' '); \
);

Definition at line 156 of file Logger.h.

_SWC_FS_ERR
#define _SWC_FS_ERR(_error, _cmd, _tracker, _code)
Definition: Logger.h:12
SWC_LOG_OSTREAM
#define SWC_LOG_OSTREAM
Definition: Logger.h:44
SWC_LOG_OUT
#define SWC_LOG_OUT(pr, _code_)
Definition: Logger.h:178
SWC::Error::FS_PATH_NOT_FOUND
@ FS_PATH_NOT_FOUND
Definition: Error.h:97
print
void print(std::ostream &out) const
SWC::Error::OK
@ OK
Definition: Error.h:45
SWC::LOG_DEBUG
@ LOG_DEBUG
Definition: Logger.h:36
SWC::Error::FS_EOF
@ FS_EOF
Definition: Error.h:96
SWC::LOG_ERROR
@ LOG_ERROR
Definition: Logger.h:32
_SWC_FS_FD_ERR
#define _SWC_FS_FD_ERR(_error, _cmd, _smartfd, _tracker, _code)
Definition: Logger.h:21