/// <summary> /// Set the logging factory for ROS.NET /// </summary> /// <param name="factory"> The logging factory to use for logging </param> public static void SetLoggerFactory(ILoggerFactory factory) { ApplicationLogging.LoggerFactory = factory; // recreate logger to make sure the new log settings form the factory are used logger = ApplicationLogging.CreateLogger(nameof(ROS)); if (initialized) { logger.LogWarning("Logging should be configured before initializing the ROS system."); } }
public Connection(TcpClient client) { this.client = client ?? throw new ArgumentNullException(nameof(client)); this.Stream = client.GetStream(); this.logger = ApplicationLogging.CreateLogger <Connection>(); }
public ServiceTypeRegistry() : base(ApplicationLogging.CreateLogger <ServiceTypeRegistry>()) { }
public MessageTypeRegistry() : base(ApplicationLogging.CreateLogger <MessageTypeRegistry>()) { }