aboutsummaryrefslogtreecommitdiff
path: root/openssl/diagnostics.cxx
blob: f1713b5c198bf957e776ccac40c7dfbe9eef70b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// file      : openssl/diagnostics.cxx -*- C++ -*-
// license   : MIT; see accompanying LICENSE file

#include <openssl/diagnostics.hxx>

namespace openssl
{
  // Diagnostic facility, project specifics.
  //

  void simple_prologue_base::
  operator() (const diag_record& r) const
  {
    if (type_ != nullptr)
      r << type_;

    if (name_ != nullptr)
      r << name_;

    if (data_ != nullptr)
      r << '(' << data_ << ')';

    if (name_ != nullptr || data_ != nullptr)
      r << ": ";
  }

  basic_mark error ("error: ");
  basic_mark warn  ("warning: ");
  basic_mark info  ("info: ");
  basic_mark text  (nullptr);
  fail_mark  fail  ("error: ");

  const fail_end endf;
}