1 //===-- LogMessage.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_LOGMESSAGE_H 10 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_DARWINLOG_LOGMESSAGE_H 11 12 #include <string> 13 14 class LogMessage { 15 public: 16 virtual ~LogMessage(); 17 18 virtual bool HasActivity() const = 0; 19 20 virtual const char *GetActivity() const = 0; 21 22 virtual std::string GetActivityChain() const = 0; 23 24 virtual bool HasCategory() const = 0; 25 26 virtual const char *GetCategory() const = 0; 27 28 virtual bool HasSubsystem() const = 0; 29 30 virtual const char *GetSubsystem() const = 0; 31 32 // This can be expensive, so once we ask for it, we'll cache the result. 33 virtual const char *GetMessage() const = 0; 34 35 protected: 36 LogMessage(); 37 }; 38 39 #endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_DARWINLOG_LOGMESSAGE_H 40