Open-Systems-Pharmacology / QualificationRunner

Qualification runner in charge of managing a qualification workflow
Other
0 stars 1 forks source link

Log file as txt created by serilog are very weird #90

Closed msevestre closed 3 years ago

msevestre commented 3 years ago

@abdelr @georgeDaskalakis

I am trying to run the qualificationRunner which starts the PKSim.CLI with some options. For instance it looks like so

 var args = new List<string>
         {
            "qualification",
            "-i",
            configFile.InQuotes(),
            "-l",
            logFile.InQuotes(),
            "--logLevel",
            logLevel.ToString(),
            "-r"
         };

I am passing a logfile path as well as a loglevel. I started the runner as loglevel debug passing the following path for log file var logFile = Path.Combine(qualifcationConfiguration.TempFolder, "log.txt");

Here is what is created instead

image

2021-09-17T13:03:54.4936840-04:00  [INF] Starting validation run... (5fad33c5)
2021-09-17T13:04:02.8727560-04:00  [INF] Starting qualification run... (80cc7546)

It is crucial that this is fixed. Specifically, the log file path cannot be ignroed as we are watching for changes in this files.

msevestre commented 3 years ago

FYI @Yuri05

georgeDaskalakis commented 3 years ago

Currently the SHA and log file name issues are fixed. logLevel is covered in the last open issues, so I suggest we just close this one. Just as a note: the formating of the entries is being set in Core, in OSPSuite.Infrastructure\Services\LoggingBuilderExtensions.cs , line 39, it is the parameter outputTemplate. If there are specific requirements concerning the formatting of the entries, let's put them down on a separate issue and I will implement them. Of course, if it needed to pass this outputTemplate as a parameter so that this template can vary from solution to solution, this would also be easy to implement.