Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
RemoteLogger.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.3
4// <auto-generated>Generated from Slice file 'RemoteLogger.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_RemoteLogger_h_
8#define Ice_RemoteLogger_h_
9
11#include <Ice/Ice.h>
12#include "BuiltinSequences.h"
13#include <list>
14
15#ifndef ICE_DISABLE_VERSION
16# if ICE_INT_VERSION / 100 != 308
17# error Ice version mismatch!
18# endif
19# if ICE_INT_VERSION % 100 >= 50
20# error Beta header file detected
21# endif
22# if ICE_INT_VERSION % 100 < 3
23# error Ice patch level mismatch!
24# endif
25#endif
26
27// NOLINTBEGIN(modernize-concat-nested-namespaces)
28
29namespace Ice
30{
31 /// Represents the different types of log messages.
32 /// @remarks The Slice compiler generated this enum class from Slice enumeration `::Ice::LogMessageType`.
33 enum class LogMessageType : std::uint8_t
34 {
35 /// A print message.
37
38 /// A trace message.
40
41 /// A warning message.
43
44 /// An error message.
46 };
47
48 /// Outputs the enumerator name or underlying value of a LogMessageType to a stream.
49 /// @param os The output stream.
50 /// @param value The value to output.
51 /// @return The output stream.
52 ICE_API std::ostream& operator<<(std::ostream& os, LogMessageType value);
53
54 /// A sequence of #LogMessageType.
55 using LogMessageTypeSeq = std::vector<LogMessageType>;
56
57 struct LogMessage;
58
59 /// A sequence of LogMessage.
60 using LogMessageSeq = std::list<LogMessage>;
61
62 class RemoteLoggerPrx;
63
64 class LoggerAdminPrx;
65}
66
67namespace Ice
68{
69 /// Receives the log messages sent by the Logger admin facet of a communicator.
70 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::RemoteLogger`.
71 /// @see LoggerAdminPrx::attachRemoteLogger
72 /// @headerfile Ice/Ice.h
73 class ICE_API RemoteLoggerPrx : public Ice::Proxy<RemoteLoggerPrx, Ice::ObjectPrx>
74 {
75 public:
76 /// Constructs a proxy from a Communicator and a proxy string.
77 /// @param communicator The communicator of the new proxy.
78 /// @param proxyString The proxy string to parse.
79 RemoteLoggerPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
80
81 /// Copy constructor. Constructs with a copy of the contents of @p other.
82 /// @param other The proxy to copy from.
83 RemoteLoggerPrx(const RemoteLoggerPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
84
85 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
86 /// @param other The proxy to move from.
87 RemoteLoggerPrx(RemoteLoggerPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
88
89 ~RemoteLoggerPrx() override;
90
91 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
92 /// @param rhs The proxy to copy from.
93 /// @return A reference to this proxy.
95 {
96 if (this != &rhs)
97 {
99 }
100 return *this;
101 }
102
103 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
104 /// @param rhs The proxy to move from.
106 {
107 if (this != &rhs)
108 {
109 Ice::ObjectPrx::operator=(std::move(rhs));
110 }
111 return *this;
112 }
113
114 /// Initializes this remote logger with the prefix and the most recent log messages of the logger of the
115 /// communicator that hosts the Logger admin facet. This facet calls this operation once, after
116 /// ::Ice::LoggerAdminPrx::attachRemoteLogger attaches this remote logger.
117 /// @param prefix The prefix of that logger.
118 /// @param logMessages The most recent log messages cached by the Logger admin facet that match the filters
119 /// given to ::Ice::LoggerAdminPrx::attachRemoteLogger, oldest first, up to its `messageMax`. This sequence is
120 /// empty when `messageMax` is 0.
121 /// @param context The request context.
122 void init(std::string_view prefix, const LogMessageSeq& logMessages, const Ice::Context& context = Ice::noExplicitContext) const;
123
124 /// Initializes this remote logger with the prefix and the most recent log messages of the logger of the
125 /// communicator that hosts the Logger admin facet. This facet calls this operation once, after
126 /// ::Ice::LoggerAdminPrx::attachRemoteLogger attaches this remote logger.
127 /// @param prefix The prefix of that logger.
128 /// @param logMessages The most recent log messages cached by the Logger admin facet that match the filters
129 /// given to ::Ice::LoggerAdminPrx::attachRemoteLogger, oldest first, up to its `messageMax`. This sequence is
130 /// empty when `messageMax` is 0.
131 /// @param context The request context.
132 /// @return A future that becomes available when the invocation completes.
133 [[nodiscard]] std::future<void> initAsync(std::string_view prefix, const LogMessageSeq& logMessages, const Ice::Context& context = Ice::noExplicitContext) const;
134
135 /// Initializes this remote logger with the prefix and the most recent log messages of the logger of the
136 /// communicator that hosts the Logger admin facet. This facet calls this operation once, after
137 /// ::Ice::LoggerAdminPrx::attachRemoteLogger attaches this remote logger.
138 /// @param prefix The prefix of that logger.
139 /// @param logMessages The most recent log messages cached by the Logger admin facet that match the filters
140 /// given to ::Ice::LoggerAdminPrx::attachRemoteLogger, oldest first, up to its `messageMax`. This sequence is
141 /// empty when `messageMax` is 0.
142 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
143 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
144 /// function.
145 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
146 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
147 /// function.
148 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
149 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
150 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
151 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
152 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
153 /// asynchronous case.
154 /// @param context The request context.
155 /// @return A function that can be called to cancel the invocation locally.
156 /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
157 /// callback: a successful invocation completes with the sent callback. When this proxy is a batch
158 /// proxy, this function only adds the request to the batch: the Ice runtime calls none of the
159 /// callbacks, and the request is sent later, by a flush.
160 // NOLINTNEXTLINE(modernize-use-nodiscard)
161 std::function<void()> initAsync(std::string_view prefix, const LogMessageSeq& logMessages, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
162
163 /// @private
164 void _iceI_init(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, const LogMessageSeq&, const Ice::Context&) const;
165
166 /// Receives a log message that matches the filters given to ::Ice::LoggerAdminPrx::attachRemoteLogger.
167 /// @param message The log message.
168 /// @param context The request context.
169 /// @remarks The Logger admin facet can call ::Ice::RemoteLoggerPrx::log before ::Ice::RemoteLoggerPrx::init, even though the log messages
170 /// passed to ::Ice::RemoteLoggerPrx::init are older.
171 void log(const LogMessage& message, const Ice::Context& context = Ice::noExplicitContext) const;
172
173 /// Receives a log message that matches the filters given to ::Ice::LoggerAdminPrx::attachRemoteLogger.
174 /// @param message The log message.
175 /// @param context The request context.
176 /// @return A future that becomes available when the invocation completes.
177 /// @remarks The Logger admin facet can call ::Ice::RemoteLoggerPrx::log before ::Ice::RemoteLoggerPrx::init, even though the log messages
178 /// passed to ::Ice::RemoteLoggerPrx::init are older.
179 [[nodiscard]] std::future<void> logAsync(const LogMessage& message, const Ice::Context& context = Ice::noExplicitContext) const;
180
181 /// Receives a log message that matches the filters given to ::Ice::LoggerAdminPrx::attachRemoteLogger.
182 /// @param message The log message.
183 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
184 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
185 /// function.
186 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
187 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
188 /// function.
189 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
190 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
191 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
192 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
193 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
194 /// asynchronous case.
195 /// @param context The request context.
196 /// @return A function that can be called to cancel the invocation locally.
197 /// @remarks The Logger admin facet can call ::Ice::RemoteLoggerPrx::log before ::Ice::RemoteLoggerPrx::init, even though the log messages
198 /// passed to ::Ice::RemoteLoggerPrx::init are older.
199 /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
200 /// callback: a successful invocation completes with the sent callback. When this proxy is a batch
201 /// proxy, this function only adds the request to the batch: the Ice runtime calls none of the
202 /// callbacks, and the request is sent later, by a flush.
203 // NOLINTNEXTLINE(modernize-use-nodiscard)
204 std::function<void()> logAsync(const LogMessage& message, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
205
206 /// @private
207 void _iceI_log(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const LogMessage&, const Ice::Context&) const;
208
209 /// Gets the type ID of the associated Slice interface.
210 /// @return The string `"::Ice::RemoteLogger"`.
211 static const char* ice_staticId() noexcept;
212
213 /// @private
214 static RemoteLoggerPrx _fromReference(IceInternal::ReferencePtr ref) { return RemoteLoggerPrx{std::move(ref)}; }
215
216 protected:
217 /// @private
218 RemoteLoggerPrx() = default;
219
220 /// @private
221 explicit RemoteLoggerPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
222 {
223 }
224 };
225
226 /// Provides remote access to the log messages of a communicator's logger. The Logger admin facet implements this
227 /// interface. An Ice application attaches a RemoteLoggerPrx to receive these messages, or calls
228 /// LoggerAdminPrx::getLog to retrieve the cached ones.
229 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::LoggerAdmin`.
230 /// @headerfile Ice/Ice.h
231 class ICE_API LoggerAdminPrx : public Ice::Proxy<LoggerAdminPrx, Ice::ObjectPrx>
232 {
233 public:
234 /// Constructs a proxy from a Communicator and a proxy string.
235 /// @param communicator The communicator of the new proxy.
236 /// @param proxyString The proxy string to parse.
237 LoggerAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
238
239 /// Copy constructor. Constructs with a copy of the contents of @p other.
240 /// @param other The proxy to copy from.
241 LoggerAdminPrx(const LoggerAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
242
243 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
244 /// @param other The proxy to move from.
245 LoggerAdminPrx(LoggerAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
246
247 ~LoggerAdminPrx() override;
248
249 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
250 /// @param rhs The proxy to copy from.
251 /// @return A reference to this proxy.
253 {
254 if (this != &rhs)
255 {
257 }
258 return *this;
259 }
260
261 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
262 /// @param rhs The proxy to move from.
264 {
265 if (this != &rhs)
266 {
267 Ice::ObjectPrx::operator=(std::move(rhs));
268 }
269 return *this;
270 }
271
272 /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger, then calls ::Ice::RemoteLoggerPrx::init on
273 /// @p prx. This facet detaches the remote logger when a call to it fails.
274 /// @param prx A proxy to the remote logger.
275 /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
276 /// no filtering (send all message types).
277 /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
278 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
279 /// (send all trace categories).
280 /// @param messageMax The maximum number of cached log messages (of all types) to be provided to
281 /// ::Ice::RemoteLoggerPrx::init. A negative value requests all the cached messages, and 0 requests none. This
282 /// parameter does not limit the log messages sent to ::Ice::RemoteLoggerPrx::log.
283 /// @param context The request context.
284 /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown when a remote logger with the identity of @p prx is
285 /// already attached to this facet.
286 void attachRemoteLogger(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;
287
288 /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger, then calls ::Ice::RemoteLoggerPrx::init on
289 /// @p prx. This facet detaches the remote logger when a call to it fails.
290 /// @param prx A proxy to the remote logger.
291 /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
292 /// no filtering (send all message types).
293 /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
294 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
295 /// (send all trace categories).
296 /// @param messageMax The maximum number of cached log messages (of all types) to be provided to
297 /// ::Ice::RemoteLoggerPrx::init. A negative value requests all the cached messages, and 0 requests none. This
298 /// parameter does not limit the log messages sent to ::Ice::RemoteLoggerPrx::log.
299 /// @param context The request context.
300 /// @return A future that becomes available when the invocation completes.
301 [[nodiscard]] std::future<void> attachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;
302
303 /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger, then calls ::Ice::RemoteLoggerPrx::init on
304 /// @p prx. This facet detaches the remote logger when a call to it fails.
305 /// @param prx A proxy to the remote logger.
306 /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
307 /// no filtering (send all message types).
308 /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
309 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
310 /// (send all trace categories).
311 /// @param messageMax The maximum number of cached log messages (of all types) to be provided to
312 /// ::Ice::RemoteLoggerPrx::init. A negative value requests all the cached messages, and 0 requests none. This
313 /// parameter does not limit the log messages sent to ::Ice::RemoteLoggerPrx::log.
314 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
315 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
316 /// function.
317 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
318 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
319 /// function.
320 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
321 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
322 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
323 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
324 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
325 /// asynchronous case.
326 /// @param context The request context.
327 /// @return A function that can be called to cancel the invocation locally.
328 // NOLINTNEXTLINE(modernize-use-nodiscard)
329 std::function<void()> attachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
330
331 /// @private
332 void _iceI_attachRemoteLogger(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<RemoteLoggerPrx>&, const LogMessageTypeSeq&, const StringSeq&, std::int32_t, const Ice::Context&) const;
333
334 /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
335 /// @param prx A proxy to the remote logger. This facet uses only the identity of this proxy.
336 /// @param context The request context.
337 /// @return `true` if a remote logger with this identity was attached and is now detached, and `false`
338 /// otherwise.
339 bool detachRemoteLogger(const std::optional<RemoteLoggerPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
340
341 /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
342 /// @param prx A proxy to the remote logger. This facet uses only the identity of this proxy.
343 /// @param context The request context.
344 /// @return A future that becomes available when the invocation completes. This future holds:
345 /// - `true` if a remote logger with this identity was attached and is now detached, and `false`
346 /// otherwise.
347 [[nodiscard]] std::future<bool> detachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const;
348
349 /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
350 /// @param prx A proxy to the remote logger. This facet uses only the identity of this proxy.
351 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
352 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
353 /// function. It accepts:
354 /// - `true` if a remote logger with this identity was attached and is now detached, and `false`
355 /// otherwise.
356 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
357 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
358 /// function.
359 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
360 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
361 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
362 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
363 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
364 /// asynchronous case.
365 /// @param context The request context.
366 /// @return A function that can be called to cancel the invocation locally.
367 // NOLINTNEXTLINE(modernize-use-nodiscard)
368 std::function<void()> detachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, std::function<void(bool)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
369
370 /// @private
371 void _iceI_detachRemoteLogger(const std::shared_ptr<IceInternal::OutgoingAsyncT<bool>>&, const std::optional<RemoteLoggerPrx>&, const Ice::Context&) const;
372
373 /// Retrieves the most recent log messages cached by this facet, oldest first. The properties
374 /// `Ice.Admin.Logger.KeepLogs` and `Ice.Admin.Logger.KeepTraces` set how many log messages it caches.
375 /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
376 /// filtering (send all message types).
377 /// @param traceCategories The categories of traces that the caller wishes to receive. This parameter is
378 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering (send
379 /// all trace categories).
380 /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
381 /// requests all the cached messages, and 0 requests none.
382 /// @param[out] prefix The prefix of the associated local logger.
383 /// @param context The request context.
384 /// @return The log messages.
385 LogMessageSeq getLog(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::string& prefix, const Ice::Context& context = Ice::noExplicitContext) const;
386
387 /// Retrieves the most recent log messages cached by this facet, oldest first. The properties
388 /// `Ice.Admin.Logger.KeepLogs` and `Ice.Admin.Logger.KeepTraces` set how many log messages it caches.
389 /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
390 /// filtering (send all message types).
391 /// @param traceCategories The categories of traces that the caller wishes to receive. This parameter is
392 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering (send
393 /// all trace categories).
394 /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
395 /// requests all the cached messages, and 0 requests none.
396 /// @param context The request context.
397 /// @return A future that becomes available when the invocation completes. This future holds:
398 /// - `returnValue` The log messages.
399 /// - `prefix` The prefix of the associated local logger.
400 [[nodiscard]] std::future<std::tuple<LogMessageSeq, std::string>> getLogAsync(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;
401
402 /// Retrieves the most recent log messages cached by this facet, oldest first. The properties
403 /// `Ice.Admin.Logger.KeepLogs` and `Ice.Admin.Logger.KeepTraces` set how many log messages it caches.
404 /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
405 /// filtering (send all message types).
406 /// @param traceCategories The categories of traces that the caller wishes to receive. This parameter is
407 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering (send
408 /// all trace categories).
409 /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
410 /// requests all the cached messages, and 0 requests none.
411 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
412 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
413 /// function. It accepts:
414 /// - `returnValue` The log messages.
415 /// - `prefix` The prefix of the associated local logger.
416 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
417 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
418 /// function.
419 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
420 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
421 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
422 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
423 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
424 /// asynchronous case.
425 /// @param context The request context.
426 /// @return A function that can be called to cancel the invocation locally.
427 // NOLINTNEXTLINE(modernize-use-nodiscard)
428 std::function<void()> getLogAsync(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::function<void(::Ice::LogMessageSeq, std::string)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
429
430 /// @private
431 void _iceI_getLog(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<LogMessageSeq, std::string>>>&, const LogMessageTypeSeq&, const StringSeq&, std::int32_t, const Ice::Context&) const;
432
433 /// Gets the type ID of the associated Slice interface.
434 /// @return The string `"::Ice::LoggerAdmin"`.
435 static const char* ice_staticId() noexcept;
436
437 /// @private
438 static LoggerAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return LoggerAdminPrx{std::move(ref)}; }
439
440 protected:
441 /// @private
442 LoggerAdminPrx() = default;
443
444 /// @private
445 explicit LoggerAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
446 {
447 }
448 };
449}
450
451namespace Ice
452{
453 /// Represents a full log message.
454 /// @remarks The Slice compiler generated this struct from Slice struct `::Ice::LogMessage`.
455 /// @headerfile Ice/Ice.h
457 {
458 /// The type of this log message.
460
461 /// The date and time when the application logged this message, expressed as the number of microseconds since
462 /// the Unix Epoch (00:00:00 UTC on 1 January 1970).
463 std::int64_t timestamp;
464
465 /// For a message of type 'trace', the trace category of this log message; otherwise, the empty string.
466 std::string traceCategory;
467
468 /// The log message itself.
469 std::string message;
470
471 /// Creates a tuple with all the fields of this struct.
472 /// @return A tuple with all the fields of this struct.
473 [[nodiscard]] std::tuple<const ::Ice::LogMessageType&, const std::int64_t&, const std::string&, const std::string&> ice_tuple() const
474 {
475 return std::tie(type, timestamp, traceCategory, message);
476 }
477
478 /// Outputs the name and value of each field of this instance to the stream.
479 /// @param os The output stream.
480 ICE_API void ice_printFields(std::ostream& os) const;
481 };
482
483 /// Outputs the description of a LogMessage to a stream, including all its fields.
484 /// @param os The output stream.
485 /// @param value The instance to output.
486 /// @return The output stream.
487 ICE_API std::ostream& operator<<(std::ostream& os, const LogMessage& value);
488
489 /// Thrown when a remote logger with the same identity is already attached to the Logger admin facet.
490 /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::RemoteLoggerAlreadyAttachedException`.
491 /// @headerfile Ice/Ice.h
493 {
494 public:
495 /// Gets the type ID of the associated Slice exception.
496 /// @return The string `"::Ice::RemoteLoggerAlreadyAttachedException"`.
497 static const char* ice_staticId() noexcept;
498
499 [[nodiscard]] const char* ice_id() const noexcept override;
500
501 void ice_throw() const override;
502
503 protected:
504 /// @private
505 void _writeImpl(Ice::OutputStream*) const override;
506
507 /// @private
508 void _readImpl(Ice::InputStream*) override;
509 };
510
511 /// @cond INTERNAL
512 using Ice::Tuple::operator<;
513 using Ice::Tuple::operator<=;
514 using Ice::Tuple::operator>;
515 using Ice::Tuple::operator>=;
516 using Ice::Tuple::operator==;
517 using Ice::Tuple::operator!=;
518 /// @endcond
519}
520
521namespace Ice
522{
523 /// Receives the log messages sent by the Logger admin facet of a communicator.
524 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RemoteLogger`.
525 /// @see LoggerAdminPrx::attachRemoteLogger
526 /// @headerfile Ice/Ice.h
527 class ICE_API RemoteLogger : public virtual Ice::Object
528 {
529 public:
530 /// The associated proxy type.
532
533 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
534 /// @param request The incoming request.
535 /// @param sendResponse The callback to send the response.
536 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
537
538 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
539
540 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
541
542 /// Initializes this remote logger with the prefix and the most recent log messages of the logger of the
543 /// communicator that hosts the Logger admin facet. This facet calls this operation once, after
544 /// ::Ice::LoggerAdminPrx::attachRemoteLogger attaches this remote logger.
545 /// @param prefix The prefix of that logger.
546 /// @param logMessages The most recent log messages cached by the Logger admin facet that match the filters
547 /// given to ::Ice::LoggerAdminPrx::attachRemoteLogger, oldest first, up to its `messageMax`. This sequence is
548 /// empty when `messageMax` is 0.
549 /// @param current The Current object of the incoming request.
550 virtual void init(std::string prefix, LogMessageSeq logMessages, const Ice::Current& current) = 0;
551
552 /// @private
553 void _iceD_init(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
554
555 /// Receives a log message that matches the filters given to ::Ice::LoggerAdminPrx::attachRemoteLogger.
556 /// @param message The log message.
557 /// @param current The Current object of the incoming request.
558 /// @remarks The Logger admin facet can call ::Ice::RemoteLoggerPrx::log before ::Ice::RemoteLoggerPrx::init, even though the log messages
559 /// passed to ::Ice::RemoteLoggerPrx::init are older.
560 virtual void log(LogMessage message, const Ice::Current& current) = 0;
561
562 /// @private
563 void _iceD_log(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
564
565 /// Gets the type ID of the associated Slice interface.
566 /// @return The string `"::Ice::RemoteLogger"`.
567 static const char* ice_staticId() noexcept;
568 };
569
570 /// A shared pointer to a RemoteLogger.
571 using RemoteLoggerPtr = std::shared_ptr<RemoteLogger>;
572
573 /// Provides remote access to the log messages of a communicator's logger. The Logger admin facet implements this
574 /// interface. An Ice application attaches a RemoteLoggerPrx to receive these messages, or calls
575 /// LoggerAdminPrx::getLog to retrieve the cached ones.
576 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LoggerAdmin`.
577 /// @headerfile Ice/Ice.h
578 class ICE_API LoggerAdmin : public virtual Ice::Object
579 {
580 public:
581 /// The associated proxy type.
582 using ProxyType = LoggerAdminPrx;
583
584 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
585 /// @param request The incoming request.
586 /// @param sendResponse The callback to send the response.
587 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
588
589 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
590
591 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
592
593 /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger, then calls ::Ice::RemoteLoggerPrx::init on
594 /// @p prx. This facet detaches the remote logger when a call to it fails.
595 /// @param prx A proxy to the remote logger.
596 /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
597 /// no filtering (send all message types).
598 /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
599 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
600 /// (send all trace categories).
601 /// @param messageMax The maximum number of cached log messages (of all types) to be provided to
602 /// ::Ice::RemoteLoggerPrx::init. A negative value requests all the cached messages, and 0 requests none. This
603 /// parameter does not limit the log messages sent to ::Ice::RemoteLoggerPrx::log.
604 /// @param current The Current object of the incoming request.
605 /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown when a remote logger with the identity of @p prx is
606 /// already attached to this facet.
607 virtual void attachRemoteLogger(std::optional<RemoteLoggerPrx> prx, LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, const Ice::Current& current) = 0;
608
609 /// @private
610 void _iceD_attachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
611
612 /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
613 /// @param prx A proxy to the remote logger. This facet uses only the identity of this proxy.
614 /// @param current The Current object of the incoming request.
615 /// @return `true` if a remote logger with this identity was attached and is now detached, and `false`
616 /// otherwise.
617 virtual bool detachRemoteLogger(std::optional<RemoteLoggerPrx> prx, const Ice::Current& current) = 0;
618
619 /// @private
620 void _iceD_detachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
621
622 /// Retrieves the most recent log messages cached by this facet, oldest first. The properties
623 /// `Ice.Admin.Logger.KeepLogs` and `Ice.Admin.Logger.KeepTraces` set how many log messages it caches.
624 /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
625 /// filtering (send all message types).
626 /// @param traceCategories The categories of traces that the caller wishes to receive. This parameter is
627 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering (send
628 /// all trace categories).
629 /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
630 /// requests all the cached messages, and 0 requests none.
631 /// @param[out] prefix The prefix of the associated local logger.
632 /// @param current The Current object of the incoming request.
633 /// @return The log messages.
634 virtual LogMessageSeq getLog(LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::string& prefix, const Ice::Current& current) = 0;
635
636 /// @private
637 void _iceD_getLog(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
638
639 /// Gets the type ID of the associated Slice interface.
640 /// @return The string `"::Ice::LoggerAdmin"`.
641 static const char* ice_staticId() noexcept;
642 };
643
644 /// A shared pointer to a LoggerAdmin.
645 using LoggerAdminPtr = std::shared_ptr<LoggerAdmin>;
646}
647
648namespace Ice
649{
650 /// Receives the log messages sent by the Logger admin facet of a communicator.
651 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RemoteLogger`.
652 /// @see LoggerAdminPrx::attachRemoteLogger
653 /// @headerfile Ice/Ice.h
654 class ICE_API AsyncRemoteLogger : public virtual Ice::Object
655 {
656 public:
657 /// The associated proxy type.
659
660 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
661 /// @param request The incoming request.
662 /// @param sendResponse The callback to send the response.
663 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
664
665 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
666
667 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
668
669 /// Initializes this remote logger with the prefix and the most recent log messages of the logger of the
670 /// communicator that hosts the Logger admin facet. This facet calls this operation once, after
671 /// ::Ice::LoggerAdminPrx::attachRemoteLogger attaches this remote logger.
672 /// @param prefix The prefix of that logger.
673 /// @param logMessages The most recent log messages cached by the Logger admin facet that match the filters
674 /// given to ::Ice::LoggerAdminPrx::attachRemoteLogger, oldest first, up to its `messageMax`. This sequence is
675 /// empty when `messageMax` is 0.
676 /// @param response The response callback.
677 /// @param exception The exception callback.
678 /// @param current The Current object of the incoming request.
679 virtual void initAsync(std::string prefix, LogMessageSeq logMessages, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
680
681 /// @private
682 void _iceD_init(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
683
684 /// Receives a log message that matches the filters given to ::Ice::LoggerAdminPrx::attachRemoteLogger.
685 /// @param message The log message.
686 /// @param response The response callback.
687 /// @param exception The exception callback.
688 /// @param current The Current object of the incoming request.
689 /// @remarks The Logger admin facet can call ::Ice::RemoteLoggerPrx::log before ::Ice::RemoteLoggerPrx::init, even though the log messages
690 /// passed to ::Ice::RemoteLoggerPrx::init are older.
691 virtual void logAsync(LogMessage message, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
692
693 /// @private
694 void _iceD_log(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
695
696 /// Gets the type ID of the associated Slice interface.
697 /// @return The string `"::Ice::RemoteLogger"`.
698 static const char* ice_staticId() noexcept;
699 };
700
701 /// A shared pointer to an AsyncRemoteLogger.
702 using AsyncRemoteLoggerPtr = std::shared_ptr<AsyncRemoteLogger>;
703
704 /// Provides remote access to the log messages of a communicator's logger. The Logger admin facet implements this
705 /// interface. An Ice application attaches a RemoteLoggerPrx to receive these messages, or calls
706 /// LoggerAdminPrx::getLog to retrieve the cached ones.
707 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LoggerAdmin`.
708 /// @headerfile Ice/Ice.h
709 class ICE_API AsyncLoggerAdmin : public virtual Ice::Object
710 {
711 public:
712 /// The associated proxy type.
714
715 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
716 /// @param request The incoming request.
717 /// @param sendResponse The callback to send the response.
718 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
719
720 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
721
722 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
723
724 /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger, then calls ::Ice::RemoteLoggerPrx::init on
725 /// @p prx. This facet detaches the remote logger when a call to it fails.
726 /// @param prx A proxy to the remote logger.
727 /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
728 /// no filtering (send all message types).
729 /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
730 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
731 /// (send all trace categories).
732 /// @param messageMax The maximum number of cached log messages (of all types) to be provided to
733 /// ::Ice::RemoteLoggerPrx::init. A negative value requests all the cached messages, and 0 requests none. This
734 /// parameter does not limit the log messages sent to ::Ice::RemoteLoggerPrx::log.
735 /// @param response The response callback.
736 /// @param exception The exception callback.
737 /// @param current The Current object of the incoming request.
738 /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown when a remote logger with the identity of @p prx is
739 /// already attached to this facet.
740 virtual void attachRemoteLoggerAsync(std::optional<RemoteLoggerPrx> prx, LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
741
742 /// @private
743 void _iceD_attachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
744
745 /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
746 /// @param prx A proxy to the remote logger. This facet uses only the identity of this proxy.
747 /// @param response The response callback. It accepts:
748 /// - `true` if a remote logger with this identity was attached and is now detached, and `false`
749 /// otherwise.
750 /// @param exception The exception callback.
751 /// @param current The Current object of the incoming request.
752 virtual void detachRemoteLoggerAsync(std::optional<RemoteLoggerPrx> prx, std::function<void(bool returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
753
754 /// @private
755 void _iceD_detachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
756
757 /// Retrieves the most recent log messages cached by this facet, oldest first. The properties
758 /// `Ice.Admin.Logger.KeepLogs` and `Ice.Admin.Logger.KeepTraces` set how many log messages it caches.
759 /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
760 /// filtering (send all message types).
761 /// @param traceCategories The categories of traces that the caller wishes to receive. This parameter is
762 /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering (send
763 /// all trace categories).
764 /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
765 /// requests all the cached messages, and 0 requests none.
766 /// @param response The response callback. It accepts:
767 /// - `returnValue` The log messages.
768 /// - `prefix` The prefix of the associated local logger.
769 /// @param exception The exception callback.
770 /// @param current The Current object of the incoming request.
771 virtual void getLogAsync(LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function<void(const LogMessageSeq& returnValue, std::string_view prefix)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
772
773 /// @private
774 void _iceD_getLog(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
775
776 /// Gets the type ID of the associated Slice interface.
777 /// @return The string `"::Ice::LoggerAdmin"`.
778 static const char* ice_staticId() noexcept;
779 };
780
781 /// A shared pointer to an AsyncLoggerAdmin.
782 using AsyncLoggerAdminPtr = std::shared_ptr<AsyncLoggerAdmin>;
783}
784
785namespace Ice
786{
787 /// @cond INTERNAL
788 template<>
790 {
791 static constexpr StreamHelperCategory helper = StreamHelperCategoryEnum;
792 static constexpr int minValue = 0;
793 static constexpr int maxValue = 3;
794 static constexpr int minWireSize = 1;
795 static constexpr bool fixedLength = false;
796 };
797 /// @endcond
798
799 /// @cond INTERNAL
800 template<>
802 {
803 static constexpr StreamHelperCategory helper = StreamHelperCategoryStruct;
804 static constexpr int minWireSize = 11;
805 static constexpr bool fixedLength = false;
806 };
807
808 template<>
809 struct StreamReader<::Ice::LogMessage>
810 {
811 /// Unmarshals a ::Ice::LogMessage from the input stream.
812 static void read(InputStream* istr, ::Ice::LogMessage& v)
813 {
814 istr->readAll(v.type, v.timestamp, v.traceCategory, v.message);
815 }
816 };
817 /// @endcond
818}
819
820// NOLINTEND(modernize-concat-nested-namespaces)
821
823#endif
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
LoggerAdminPrx ProxyType
The associated proxy type.
virtual void getLogAsync(LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function< void(const LogMessageSeq &returnValue, std::string_view prefix)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Retrieves the most recent log messages cached by this facet, oldest first.
virtual void attachRemoteLoggerAsync(std::optional< RemoteLoggerPrx > prx, LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Attaches a Ice::RemoteLoggerPrx object to the local logger, then calls Ice::RemoteLoggerPrx::init on ...
virtual void detachRemoteLoggerAsync(std::optional< RemoteLoggerPrx > prx, std::function< void(bool returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Detaches a Ice::RemoteLoggerPrx object from the local logger.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Provides remote access to the log messages of a communicator's logger.
RemoteLoggerPrx ProxyType
The associated proxy type.
virtual void logAsync(LogMessage message, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Receives a log message that matches the filters given to Ice::LoggerAdminPrx::attachRemoteLogger.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void initAsync(std::string prefix, LogMessageSeq logMessages, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Initializes this remote logger with the prefix and the most recent log messages of the logger of the ...
Receives the log messages sent by the Logger admin facet of a communicator.
Represents a request received by a connection.
void readAll(T &v)
Reads a value (single element list) from the stream.
Represents a byte buffer used for unmarshaling data encoded using the Slice encoding.
Definition InputStream.h:50
LoggerAdminPrx(const LoggerAdminPrx &other) noexcept
Copy constructor.
bool detachRemoteLogger(const std::optional< RemoteLoggerPrx > &prx, const Ice::Context &context=Ice::noExplicitContext) const
Detaches a Ice::RemoteLoggerPrx object from the local logger.
std::function< void()> detachRemoteLoggerAsync(const std::optional< RemoteLoggerPrx > &prx, std::function< void(bool)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Detaches a Ice::RemoteLoggerPrx object from the local logger.
LoggerAdminPrx & operator=(const LoggerAdminPrx &rhs) noexcept
Copy assignment operator.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< void > attachRemoteLoggerAsync(const std::optional< RemoteLoggerPrx > &prx, const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, const Ice::Context &context=Ice::noExplicitContext) const
Attaches a Ice::RemoteLoggerPrx object to the local logger, then calls Ice::RemoteLoggerPrx::init on ...
LoggerAdminPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
std::function< void()> attachRemoteLoggerAsync(const std::optional< RemoteLoggerPrx > &prx, const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Attaches a Ice::RemoteLoggerPrx object to the local logger, then calls Ice::RemoteLoggerPrx::init on ...
LogMessageSeq getLog(const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, std::string &prefix, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves the most recent log messages cached by this facet, oldest first.
LoggerAdminPrx(LoggerAdminPrx &&other) noexcept
Move constructor.
LoggerAdminPrx & operator=(LoggerAdminPrx &&rhs) noexcept
Move assignment operator.
void attachRemoteLogger(const std::optional< RemoteLoggerPrx > &prx, const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, const Ice::Context &context=Ice::noExplicitContext) const
Attaches a Ice::RemoteLoggerPrx object to the local logger, then calls Ice::RemoteLoggerPrx::init on ...
std::future< bool > detachRemoteLoggerAsync(const std::optional< RemoteLoggerPrx > &prx, const Ice::Context &context=Ice::noExplicitContext) const
Detaches a Ice::RemoteLoggerPrx object from the local logger.
std::future< std::tuple< LogMessageSeq, std::string > > getLogAsync(const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves the most recent log messages cached by this facet, oldest first.
std::function< void()> getLogAsync(const LogMessageTypeSeq &messageTypes, const StringSeq &traceCategories, std::int32_t messageMax, std::function< void(::Ice::LogMessageSeq, std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Retrieves the most recent log messages cached by this facet, oldest first.
Provides remote access to the log messages of a communicator's logger.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:265
Object() noexcept=default
Default constructor.
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Represents a byte buffer used for marshaling data using the Slice encoding.
Provides typed proxy functions.
Definition Proxy.h:48
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
Thrown when a remote logger with the same identity is already attached to the Logger admin facet.
RemoteLoggerPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
void log(const LogMessage &message, const Ice::Context &context=Ice::noExplicitContext) const
Receives a log message that matches the filters given to Ice::LoggerAdminPrx::attachRemoteLogger.
std::function< void()> initAsync(std::string_view prefix, const LogMessageSeq &logMessages, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Initializes this remote logger with the prefix and the most recent log messages of the logger of the ...
RemoteLoggerPrx & operator=(RemoteLoggerPrx &&rhs) noexcept
Move assignment operator.
RemoteLoggerPrx(RemoteLoggerPrx &&other) noexcept
Move constructor.
RemoteLoggerPrx & operator=(const RemoteLoggerPrx &rhs) noexcept
Copy assignment operator.
std::future< void > logAsync(const LogMessage &message, const Ice::Context &context=Ice::noExplicitContext) const
Receives a log message that matches the filters given to Ice::LoggerAdminPrx::attachRemoteLogger.
void init(std::string_view prefix, const LogMessageSeq &logMessages, const Ice::Context &context=Ice::noExplicitContext) const
Initializes this remote logger with the prefix and the most recent log messages of the logger of the ...
std::function< void()> logAsync(const LogMessage &message, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Receives a log message that matches the filters given to Ice::LoggerAdminPrx::attachRemoteLogger.
RemoteLoggerPrx(const RemoteLoggerPrx &other) noexcept
Copy constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< void > initAsync(std::string_view prefix, const LogMessageSeq &logMessages, const Ice::Context &context=Ice::noExplicitContext) const
Initializes this remote logger with the prefix and the most recent log messages of the logger of the ...
Receives the log messages sent by the Logger admin facet of a communicator.
virtual void log(LogMessage message, const Ice::Current &current)=0
Receives a log message that matches the filters given to Ice::LoggerAdminPrx::attachRemoteLogger.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
RemoteLoggerPrx ProxyType
The associated proxy type.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void init(std::string prefix, LogMessageSeq logMessages, const Ice::Current &current)=0
Initializes this remote logger with the prefix and the most recent log messages of the logger of the ...
Receives the log messages sent by the Logger admin facet of a communicator.
Abstract base class for all exceptions defined in Slice.
Relational operators for generated structs.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::list< LogMessage > LogMessageSeq
A sequence of LogMessage.
std::shared_ptr< LoggerAdmin > LoggerAdminPtr
A shared pointer to a LoggerAdmin.
LogMessageType
Represents the different types of log messages.
@ TraceMessage
A trace message.
@ PrintMessage
A print message.
@ ErrorMessage
An error message.
@ WarningMessage
A warning message.
constexpr StreamHelperCategory StreamHelperCategoryEnum
Generated enum types.
int StreamHelperCategory
The stream helper category allows to select a StreamHelper specialization for a specific category of ...
std::vector< std::string > StringSeq
A sequence of strings.
constexpr StreamHelperCategory StreamHelperCategoryStruct
Generated struct types.
std::vector< LogMessageType > LogMessageTypeSeq
A sequence of LogMessageType.
std::ostream & operator<<(std::ostream &os, const Identity &value)
Outputs the description of an Identity to a stream, including all its fields.
std::shared_ptr< AsyncLoggerAdmin > AsyncLoggerAdminPtr
A shared pointer to an AsyncLoggerAdmin.
std::shared_ptr< RemoteLogger > RemoteLoggerPtr
A shared pointer to a RemoteLogger.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:34
std::shared_ptr< AsyncRemoteLogger > AsyncRemoteLoggerPtr
A shared pointer to an AsyncRemoteLogger.
The Ice RPC framework.
Definition SampleEvent.h:66
Provides information about an incoming request being dispatched.
Definition Current.h:18
std::tuple< const ::Ice::LogMessageType &, const std::int64_t &, const std::string &, const std::string & > ice_tuple() const
Creates a tuple with all the fields of this struct.
std::string message
The log message itself.
::Ice::LogMessageType type
The type of this log message.
void ice_printFields(std::ostream &os) const
Outputs the name and value of each field of this instance to the stream.
std::string traceCategory
For a message of type 'trace', the trace category of this log message; otherwise, the empty string.
std::int64_t timestamp
The date and time when the application logged this message, expressed as the number of microseconds s...
Represents a full log message.
Provides traits for a type that can be marshaled or unmarshaled to/from a stream of bytes using the S...