LCOV - code coverage report
Current view: top level - source/extensions/access_loggers/common - file_access_log_impl.cc (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 6 6 100.0 %
Date: 2024-01-05 06:35:25 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include "source/extensions/access_loggers/common/file_access_log_impl.h"
       2             : 
       3             : namespace Envoy {
       4             : namespace Extensions {
       5             : namespace AccessLoggers {
       6             : namespace File {
       7             : 
       8             : FileAccessLog::FileAccessLog(const Filesystem::FilePathAndType& access_log_file_info,
       9             :                              AccessLog::FilterPtr&& filter, Formatter::FormatterPtr&& formatter,
      10             :                              AccessLog::AccessLogManager& log_manager)
      11         171 :     : ImplBase(std::move(filter)), formatter_(std::move(formatter)) {
      12         171 :   log_file_ = log_manager.createAccessLog(access_log_file_info);
      13         171 : }
      14             : 
      15             : void FileAccessLog::emitLog(const Formatter::HttpFormatterContext& context,
      16         612 :                             const StreamInfo::StreamInfo& stream_info) {
      17         612 :   log_file_->write(formatter_->formatWithContext(context, stream_info));
      18         612 : }
      19             : 
      20             : } // namespace File
      21             : } // namespace AccessLoggers
      22             : } // namespace Extensions
      23             : } // namespace Envoy

Generated by: LCOV version 1.15