def get_logger_config_path()

in kinesis_video_streamer/launch/kinesis_video_streamer.launch.py [0:0]


def get_logger_config_path(user_logger_config_path):
  logger_config_path = os.path.join(get_package_share_directory('kinesis_video_streamer'), 'config', 'kvs_log_configuration')
  fallback_path = '/tmp/kvs_log_configuration'

  if user_logger_config_path != fallback_path:
    # The config file was modified by the user - do not override
    return None

  if len(logger_config_path) <= MAX_STRING_LEN:
    # Override /tmp/... to the actual path
    return logger_config_path

  # Path too long and no alternative was specified - copy to /tmp/ fallback path (platform-dependent)
  shutil.copy(logger_config_path, fallback_path)

  return fallback_path