swebb2066 commented on issue #570: URL: https://github.com/apache/logging-log4cxx/issues/570#issuecomment-3667958374
> The lowest level that we do is to use [fputs](https://github.com/apache/logging-log4cxx/blob/18dd6730085fd2158e64e5588da56f98852a6812/src/main/cpp/systemoutwriter.cpp#L78). This will go through the C library and use the builtin C library buffering I believe the lowest level of Log4cxx is (usually) `FileOutputStream::write` which uses `apr_file_write` which: 1. obtains an OS dependent file lock 2. seeks to the end of the file 3. writes directly to the OS 4. releases the OS dependent file unlock The above is 4-5 microsecs (as in the video) and happens once per logging request unless `BufferedIO` is set `true`. But as also mentioned in the video, debugging a crash when using buffered IO is a problem. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
