Otherwise the message doesn't flush to the log
and could be lost when the program terminates.
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
let function_msg = format!("{}: ", function);
let function_cstr = chelps::wrap_string(&function);
let function_msg_cstr = chelps::wrap_string(&function_msg);
- let msg = format!($($arg),*);
+ // Always append a newline to the debug, otherwise it won't flush
+ // to the log.
+ let msg = format!("{}\n", format!($($arg),*));
let msg_cstr = chelps::wrap_string(&msg);
unsafe {
let _ = $crate::ffi::debuglevel_get_class($crate::ffi::DBGC_CLASS as usize) >= ($level as i32)