Page 1 of 1

Console Output

Posted: Wed 02 Dec 2020 9:58 pm
by Phil23
Hi Hans,

Been playing with utils & my long overdue upgrade along with AirQual enhancement.

Been looking in log files quite a bit addressing the odd issue here & there.

What I'm thinking as it runs it could provide some output to the console.
Basically selected lines that are written to the log file.

On occasions seems to take too long, (when I had errors), you do wonder what is happening.

Output to the console could be either on by default, with a silent switch, or the opposite.

The sort of thing that would be good to see would be just the starting & completion of each process.
Would provide a little immediate debugging help before opening logs etc.

A few example lines from the log I just browsed below.

Cheers

Phil.

Code: Select all

2020-12-02 09:00:07.372 SystemStatus : DoingWindows
2020-12-02 09:00:14.762 Timing of SysInfo generation = 8753 ms
2020-12-02 09:00:17.434 Maps GetFTPLock : Checking for a lockfile
2020-12-02 09:00:27.716 Timing of Map generation = 12955 ms
2020-12-02 09:00:28.075 Prediction The data: <var>
2020-12-02 09:00:28.075 Timing of WeatherForecast generation = 354 ms
2020-12-02 09:00:28.075 USerReports: Start
2020-12-02 09:00:28.075 Timing of USerReports generation = 2 ms
2020-12-02 09:00:28.075 Airquality Contructor: start
2020-12-02 09:00:28.278 Timing of AirQuality generation = 208 ms
2020-12-02 09:00:28.278 CumulusUtils : Creating class dayfile -> Opening dayfile.txt
2020-12-02 09:00:28.356 Timing of Dayfile load = 65 ms
2020-12-02 09:00:28.356 PwsFWIfuncs constructor
2020-12-02 09:00:28.778 Timing of pwsFWI generation = 415 ms
2020-12-02 09:00:28.778 Main CmulusUtils: Yadr Constructor Start

Re: Console Output

Posted: Thu 03 Dec 2020 7:36 am
by HansR
@Phil: yes I understand your point and it would be interesting when running interactively. I already thought about something like that but the logging system is about the first thing I wrote in C# so it is not so well done and does not include errorlevel selection or other output modifications. I don't want to have to write more than one logging line when console output is wanted. But yes, I do see the advantage of having selected console output, I'll think about it.
Cheers, Hans

Re: Console Output

Posted: Fri 04 Dec 2020 9:49 am
by HansR
Rethinking about it: I will revise the logging system but that will take some time and will not be in the next release.
So, some patience required :roll: ;)

Re: Console Output

Posted: Thu 10 Dec 2020 9:02 pm
by Phil23
Not seeing any output to the console yet in 483.

From what I read, my ini should now have them enabled.

Code: Select all

[General]
IgnoreDataErrors=true
GeneratejQueryInclude=true
Language=en-GB
NormalMessageToConsole=true
TraceInfoLevel=Info
(Seems the forum gets confused with [ ] within code tags.

Re: Console Output

Posted: Fri 11 Dec 2020 6:26 am
by HansR
Indeed that should give the basic messages to the console and logfile and leave all other (more verbose) info to the logfile.
So if it does not that is surprising. Something specific for Windows perhaps? Is the Windows definition of console different from the linux definition?
It works with my installation, did not explicitely test this one on windows. I'll look at it.

(note: you used a double nested (code) tag. I took the liberty correcting it)

Re: Console Output

Posted: Sun 13 Dec 2020 5:47 pm
by HansR
Time flies ...
Haven't looked at it, will do...

Re: Console Output

Posted: Mon 14 Dec 2020 9:09 am
by Phil23
I did question my script being an issue, but same result when I run it directly from a prompt.

Re: Console Output

Posted: Mon 14 Dec 2020 12:24 pm
by HansR
Mmm... there seems to be a difference between the Windows console and the Linux Console.
It's just a system call and for a change it works on the Unix like systems nut not on its native origin. Oh my... no idea.

Anybody? Why would the Windows console not show a line?

Re: Console Output

Posted: Mon 14 Dec 2020 5:12 pm
by HansR
OK. Found it: I had erroneously compiled as a Windows Application iso a Console Application.
Windows did not appreciate that.
I PMed a patch, if more users are annoyed I'll make it in a release.