]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/log/Log.cc
update sources to v12.2.3
[ceph.git] / ceph / src / log / Log.cc
index bf219d379fadf4c5f5e1dc80ad052328d12844c4..3decbc1b0ef0903035ad0f55eb4ebfb7aefc084c 100644 (file)
@@ -126,6 +126,11 @@ void Log::set_log_file(string fn)
   m_log_file = fn;
 }
 
+void Log::set_log_stderr_prefix(const std::string& p)
+{
+  m_log_stderr_prefix = p;
+}
+
 void Log::reopen_log_file()
 {
   pthread_mutex_lock(&m_flush_mutex);
@@ -327,7 +332,7 @@ void Log::_flush(EntryQueue *t, EntryQueue *requeue, bool crash)
       }
 
       if (do_stderr) {
-        cerr << buf << std::endl;
+        cerr << m_log_stderr_prefix << buf << std::endl;
       }
       if (do_fd) {
         buf[buflen] = '\n';