diff --git a/runtime/src/main.rs b/runtime/src/main.rs index 87b06c18..de22c6a3 100644 --- a/runtime/src/main.rs +++ b/runtime/src/main.rs @@ -142,9 +142,17 @@ async fn main() { // Set the log level for the Reqwest library: log_config.push_str("reqwest::async_impl::client=info"); + // Configure the initial filename. On Unix systems, the file should start + // with a dot to be hidden. + let log_basename = match cfg!(unix) + { + true => ".AI Studio Events", + false => "AI Studio Events", + }; + let logger = Logger::try_with_str(log_config).expect("Cannot create logging") .log_to_file(FileSpec::default() - .basename("AI Studio Events") + .basename(log_basename) .suppress_timestamp() .suffix("log")) .duplicate_to_stdout(Duplicate::All) @@ -155,6 +163,9 @@ async fn main() { .start().expect("Cannot start logging"); info!("Starting MindWork AI Studio:"); + let working_directory = std::env::current_dir().unwrap(); + info!(".. The working directory is: '{working_directory:?}'"); + info!(".. Version: v{app_version} (commit {app_commit_hash}, build {build_number})"); info!(".. Build time: {build_time}"); info!(".. .NET SDK: v{dotnet_sdk_version}"); @@ -190,7 +201,7 @@ async fn main() { let mut shutdown = Shutdown { // We do not want to use the Ctrl+C signal to stop the server: ctrlc: false, - + // Everything else is set to default for now: ..Shutdown::default() };