Coverage Report

Created: 2026-06-15 06:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/logging-log4cxx/src/main/cpp/writer.cpp
Line
Count
Source
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *      http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
18
#include <log4cxx/logstring.h>
19
#include <log4cxx/helpers/writer.h>
20
#include <log4cxx/helpers/loglog.h>
21
#include <log4cxx/helpers/pool.h>
22
#include <stdexcept>
23
24
using namespace LOG4CXX_NS::helpers;
25
26
IMPLEMENT_LOG4CXX_OBJECT(Writer)
27
28
Writer::Writer()
29
927
{
30
927
}
31
32
Writer::~Writer()
33
927
{
34
927
}
35
36
#if LOG4CXX_ABI_VERSION <= 15
37
void Writer::close()
38
925
{
39
925
  Pool p;
40
925
  close(p);
41
925
}
42
void Writer::flush()
43
4.61k
{
44
4.61k
  Pool p;
45
4.61k
  flush(p);
46
4.61k
}
47
void Writer::write(const LogString& str)
48
6.46k
{
49
6.46k
  Pool p;
50
6.46k
  write(str, p);
51
6.46k
}
52
#else
53
void Writer::close(Pool&) { close(); }
54
void Writer::flush(Pool&) { flush(); }
55
void Writer::write(const LogString& str, Pool&) { write(str); }
56
#endif