logFd_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_logFd File Descriptor Logging API
12  *
13  * @ref logFd_interface.h "API Reference"
14  *
15  * This API provides a method for logging messages coming from a file descriptor such as a pipe or
16  * socket. This API MUST only be used by the Supervisor.
17  *
18  * <HR>
19  *
20  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
21  */
22 /**
23  * @file logFd_interface.h
24  *
25  * Legato @ref c_logFd include file.
26  *
27  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
28  */
29 
30 #ifndef LOGFD_INTERFACE_H_INCLUDE_GUARD
31 #define LOGFD_INTERFACE_H_INCLUDE_GUARD
32 
33 
34 #include "legato.h"
35 
36 // Interface specific includes
37 #include "le_limit_interface.h"
38 
39 
40 //--------------------------------------------------------------------------------------------------
41 /**
42  *
43  * Connect the current client thread to the service providing this API. Block until the service is
44  * available.
45  *
46  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
47  * called before any other functions in this API. Normally, ConnectService is automatically called
48  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
49  *
50  * This function is created automatically.
51  */
52 //--------------------------------------------------------------------------------------------------
54 (
55  void
56 );
57 
58 //--------------------------------------------------------------------------------------------------
59 /**
60  *
61  * Try to connect the current client thread to the service providing this API. Return with an error
62  * if the service is not available.
63  *
64  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
65  * called before any other functions in this API. Normally, ConnectService is automatically called
66  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
67  *
68  * This function is created automatically.
69  *
70  * @return
71  * - LE_OK if the client connected successfully to the service.
72  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
73  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
74  * - LE_COMM_ERROR if the Service Directory cannot be reached.
75  */
76 //--------------------------------------------------------------------------------------------------
78 (
79  void
80 );
81 
82 //--------------------------------------------------------------------------------------------------
83 /**
84  *
85  * Disconnect the current client thread from the service providing this API.
86  *
87  * Normally, this function doesn't need to be called. After this function is called, there's no
88  * longer a connection to the service, and the functions in this API can't be used. For details, see
89  * @ref apiFilesC_client.
90  *
91  * This function is created automatically.
92  */
93 //--------------------------------------------------------------------------------------------------
95 (
96  void
97 );
98 
99 //--------------------------------------------------------------------------------------------------
100 /**
101  * Registers an application process' standard error for logging. Messages from this file descriptor
102  * will be logged at LE_LOG_ERR level.
103  *
104  * @return
105  * LE_OK if successful.
106  * LE_FAULT if there was an error.
107  */
108 //--------------------------------------------------------------------------------------------------
109 void logFd_StdErr
110 (
111  int fd,
112  ///< [IN] stderr file descriptor.
113 
114  const char* appName,
115  ///< [IN] Name of the application.
116 
117  const char* procName,
118  ///< [IN] Name of the process.
119 
120  int32_t pid
121  ///< [IN] PID of the process.
122 );
123 
124 //--------------------------------------------------------------------------------------------------
125 /**
126  * Registers an application process' standard out for logging. Messages from this file descriptor
127  * will be logged at LE_LOG_INFO level.
128  *
129  * @return
130  * LE_OK if successful.
131  * LE_FAULT if there was an error.
132  */
133 //--------------------------------------------------------------------------------------------------
134 void logFd_StdOut
135 (
136  int fd,
137  ///< [IN] stdout file descriptor.
138 
139  const char* appName,
140  ///< [IN] Name of the application.
141 
142  const char* procName,
143  ///< [IN] Name of the process.
144 
145  int32_t pid
146  ///< [IN] PID of the process.
147 );
148 
149 
150 #endif // LOGFD_INTERFACE_H_INCLUDE_GUARD
151 
void logFd_ConnectService(void)
le_result_t
Definition: le_basics.h:35
le_result_t logFd_TryConnectService(void)
void logFd_StdErr(int fd, const char *appName, const char *procName, int32_t pid)
void logFd_StdOut(int fd, const char *appName, const char *procName, int32_t pid)
void logFd_DisconnectService(void)