<commit_before>/*
 * NDC.hh
 *
 * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
 * Copyright 2000, <NAME>. All rights reserved.
 *
 * See the COPYING file for the terms of usage and distribution.
 */

#ifndef _LOG4CPP_NDC_HH
#define _LOG4CPP_NDC_HH

#include <string>
#include <vector>

namespace log4cpp {
    
    class NDC {
        public:

        struct DiagnosticContext {
            DiagnosticContext(const std::string& message);
            DiagnosticContext(const std::string& message, 
                              const DiagnosticContext& parent);

            std::string message;
            std::string fullMessage;
        };

        typedef vector<DiagnosticContext> ContextStack;

        static void clear();
        static ContextStack* cloneStack();
        static const std::string& get();
        static int getDepth();
        static void inherit(ContextStack* stack);
        static std::string pop();
        static void push(const std::string& message);
        static void setMaxDepth(int maxDepth);
        static NDC& getNDC();

        protected:
        NDC();

#if defined(__GNUG__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 95)
        public:
        virtual ~NDC();
#else
        protected: 
        virtual ~NDC();
#endif
        protected:
        virtual void _clear();<commit_msg>Making NDC() and ~NDC() protected was overly paranoid. They're public now.<commit_after>/*
 * NDC.hh
 *
 * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
 * Copyright 2000, <NAME>. All rights reserved.
 *
 * See the COPYING file for the terms of usage and distribution.
 */

#ifndef _LOG4CPP_NDC_HH
#define _LOG4CPP_NDC_HH

#include <string>
#include <vector>

namespace log4cpp {
    
    class NDC {
        public:

        struct DiagnosticContext {
            DiagnosticContext(const std::string& message);
            DiagnosticContext(const std::string& message, 
                              const DiagnosticContext& parent);

            std::string message;
            std::string fullMessage;
        };

        typedef vector<DiagnosticContext> ContextStack;

        static void clear();
        static ContextStack* cloneStack();
        static const std::string& get();
        static int getDepth();
        static void inherit(ContextStack* stack);
        static std::string pop();
        static void push(const std::string& message);
        static void setMaxDepth(int maxDepth);
        static NDC& getNDC();

        NDC();
        virtual ~NDC();

        protected:
        virtual void _clear();
{'fraction_non_alphanumeric': 0.09892638036809816, 'fraction_numerical': 0.009585889570552147, 'mean_word_length': 2.349165596919127, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1269072', 'n_tokens_mistral': 732, 'n_tokens_neox': 682, 'n_words': 218}