Skip to content

Commit d4ded13

Browse files
committed
[logfile] debugging help
1 parent 3dba4c5 commit d4ded13

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/logfile.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ logfile::open(std::filesystem::path filename,
142142

143143
lf_fd.close_on_exec();
144144

145-
log_info("Creating logfile: fd=%d; size=%" PRId64 "; mtime=%" PRId64
145+
log_info("Creating logfile(%p): fd=%d; size=%" PRId64 "; mtime=%" PRId64
146146
"; filename=%s",
147+
lf.get(),
147148
(int) lf_fd,
148149
(long long) lf->lf_stat.st_size,
149150
(long long) lf->lf_stat.st_mtime,
@@ -254,7 +255,9 @@ logfile::logfile(std::filesystem::path filename,
254255

255256
logfile::~logfile()
256257
{
257-
log_info("destructing logfile: %s", this->lf_filename_as_string.c_str());
258+
log_info("destructing logfile(%p): %s",
259+
this,
260+
this->lf_filename_as_string.c_str());
258261
}
259262

260263
bool

src/logfile.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ public:
115115
const logfile_open_options& loo,
116116
auto_fd fd = auto_fd{});
117117

118+
logfile(const logfile&) = delete;
119+
logfile& operator=(const logfile&) = delete;
120+
118121
~logfile() override;
119122

120123
const logfile_activity& get_activity() const { return this->lf_activity; }

0 commit comments

Comments
 (0)