blob: 21ed5cfb7d784530a6ae7f425f39aeb4be98e892 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/**
* @file Log_Msg_Android_Logcat.h
*
* @author Frederick Hornsey <hornseyf@objectcomputing.com>
*/
#ifndef ACE_LOG_MSG_ANDROID_LOGCAT_H
#define ACE_LOG_MSG_ANDROID_LOGCAT_H
#include /**/ "ace/pre.h"
#include /**/ "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#ifdef ACE_ANDROID
#include "ace/Log_Msg_Backend.h"
#include "ace/Basic_Types.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
* @class ACE_Log_Msg_Android_Logcat
*
* @brief Implements an ACE_Log_Msg_Backend that logs messages to Android's
* logging system, called Logcat. On Android this is the default output for ACE
* and the only convenient way of logging.
*
* Reference to the Logging part of Android's NDK API can be found here:
* https://developer.android.com/ndk/reference/group/logging
*/
class ACE_Export ACE_Log_Msg_Android_Logcat : public ACE_Log_Msg_Backend
{
public:
ACE_Log_Msg_Android_Logcat () = default;
~ACE_Log_Msg_Android_Logcat () override;
/// Initialize the event logging facility. NOP in this class.
int open (const ACE_TCHAR *) override;
/// Reset the backend. NOP in this class.
int reset () override;
/// Close the backend completely. NOP in this class.
int close () override;
/// This is called when we want to log a message.
ssize_t log (ACE_Log_Record &log_record) override;
};
ACE_END_VERSIONED_NAMESPACE_DECL
#endif
#include /**/ "ace/post.h"
#endif /* ACE_LOG_MSG_ANDROID_LOGCAT */
|