• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- LogFilter.h ---------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_DARWINLOG_LOGFILTER_H
10 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_DARWINLOG_LOGFILTER_H
11 
12 #include "DarwinLogInterfaces.h"
13 
14 class LogFilter {
15 public:
16   virtual ~LogFilter();
17 
18   virtual bool DoesMatch(const LogMessage &message) const = 0;
19 
MatchesAreAccepted()20   bool MatchesAreAccepted() const { return m_matches_accept; }
21 
22 protected:
LogFilter(bool matches_accept)23   LogFilter(bool matches_accept) : m_matches_accept(matches_accept) {}
24 
25 private:
26   bool m_matches_accept;
27 };
28 
29 #endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_DARWINLOG_LOGFILTER_H
30