Esempio n. 1
0
        /// <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.");
            }
        }
Esempio n. 2
0
 public Connection(TcpClient client)
 {
     this.client = client ?? throw new ArgumentNullException(nameof(client));
     this.Stream = client.GetStream();
     this.logger = ApplicationLogging.CreateLogger <Connection>();
 }
Esempio n. 3
0
 public ServiceTypeRegistry()
     : base(ApplicationLogging.CreateLogger <ServiceTypeRegistry>())
 {
 }
Esempio n. 4
0
 public MessageTypeRegistry()
     : base(ApplicationLogging.CreateLogger <MessageTypeRegistry>())
 {
 }