debug log config path

This commit is contained in:
jb-alvarado 2023-07-13 11:25:08 +02:00
parent 6ca710ded6
commit 40fd1c4751
4 changed files with 12 additions and 2 deletions

2
debian/postinst vendored
View File

@ -8,7 +8,7 @@ if [ -f /run/.containerenv ] || [ -f /run/.dockerenv ] || [ -f /.dockerenv ] ||
fi
if [ ! $(id -u $sysUser 2>/dev/null || echo -1) -ge 0 ]; then
adduser --system $sysUser
adduser --system --create-home $sysUser > /dev/null || adduser --system --home "/home/$sysUser" $sysUser
fi
if [ ! -d "/usr/share/ffplayout/db" ]; then

View File

@ -82,7 +82,7 @@ impl CurrentProgram {
let json = read_json(&self.config, None, self.is_terminated.clone(), seek, 0.0);
if let Some(file) = &json.current_file {
info!("Read Playlist: <b><magenta>{}</></b>", file);
info!("Read Playlist: <b><magenta>{file}</></b>");
}
self.json_path = json.current_file;

View File

@ -200,6 +200,11 @@ fn main() {
status_file(&config.general.stat_file, &playout_stat);
debug!(
"Use config: <b><magenta>{}</></b>",
config.general.config_path
);
match config.out.mode {
// write files/playlist to HLS m3u8 playlist
HLS => write_hls(&config, play_control, playout_stat, proc_control),

View File

@ -146,6 +146,9 @@ pub struct General {
pub help_text: String,
pub stop_threshold: f64,
#[serde(default, skip_serializing, skip_deserializing)]
pub config_path: String,
#[serde(default)]
pub stat_file: String,
@ -342,6 +345,8 @@ impl PlayoutConfig {
serde_yaml::from_reader(f).expect("Could not read config file.");
config.general.generate = None;
config.general.config_path = config_path.to_string_lossy().to_string();
config.general.stat_file = home_dir()
.unwrap_or_else(env::temp_dir)
.join(if config.general.stat_file.is_empty() {