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