| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | #nullable enable |
| | | 4 | | |
| | | 5 | | namespace Ice; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// A special plug-in that installs a logger during a communicator's initialization. |
| | | 9 | | /// Both initialize and destroy are no-op. |
| | | 10 | | /// </summary> |
| | | 11 | | public class LoggerPlugin : Plugin |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// Initializes a new instance of the <see cref="LoggerPlugin" /> class. This constructor installs a custom logger |
| | | 15 | | /// in the provided <paramref name="communicator" />. The communicator takes ownership of <paramref name="logger" /> |
| | | 16 | | /// and is responsible for disposing it when the communicator is destroyed. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <param name="communicator">The communicator in which to install the logger.</param> |
| | | 19 | | /// <param name="logger">The logger to install.</param> |
| | 0 | 20 | | public |
| | 0 | 21 | | LoggerPlugin(Communicator communicator, Logger logger) => communicator.instance.setLogger(logger); |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// This method is no-op. |
| | | 25 | | /// </summary> |
| | | 26 | | public void initialize() |
| | | 27 | | { |
| | 0 | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// This method is no-op. |
| | | 32 | | /// </summary> |
| | | 33 | | public void destroy() |
| | | 34 | | { |
| | 0 | 35 | | } |
| | | 36 | | } |