1 // Copyright (c) 2019 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _Message_PrinterSystemLog_HeaderFile
15 #define _Message_PrinterSystemLog_HeaderFile
17 #include <Message_Printer.hxx>
18 #include <TCollection_AsciiString.hxx>
20 DEFINE_STANDARD_HANDLE(Message_PrinterSystemLog, Message_Printer)
22 //! Implementation of a message printer associated with system log.
23 //! Implemented for the following systems:
24 //! - Windows, through ReportEventW().
25 //! - Android, through __android_log_write().
26 //! - UNIX/Linux, through syslog().
27 class Message_PrinterSystemLog : public Message_Printer
29 DEFINE_STANDARD_RTTIEXT(Message_PrinterSystemLog, Message_Printer)
33 Standard_EXPORT Message_PrinterSystemLog (const TCollection_AsciiString& theEventSourceName,
34 const Message_Gravity theTraceLevel = Message_Info);
37 Standard_EXPORT virtual ~Message_PrinterSystemLog();
41 //! Puts a message to the system log.
42 Standard_EXPORT virtual void send (const TCollection_AsciiString& theString,
43 const Message_Gravity theGravity) const Standard_OVERRIDE;
47 TCollection_AsciiString myEventSourceName;
49 Standard_Address myEventSource;
54 #endif // _Message_PrinterSystemLog_HeaderFile