Configure Log File to show date?

Moderators: Site Moderators, FAHC Science Team

Post Reply
Ikaar
Posts: 10
Joined: Tue Oct 08, 2024 3:10 pm

Configure Log File to show date?

Post by Ikaar »

Hi there,

sorry if this is a stupid question but i couldnt find anything helpfull for my question.
For V8.5.5 (like all V8) there is a log file for every machine. And thats fine.
But is it possible to write the date into every log file entry?
So, for example instead of:

Code: Select all

19:55:41:W :WU4233:Visualization topology too large, disabling visualization
19:56:23:I1:WU4233:Completed 2500 out of 250000 steps (1%)
write additionally 02-07-2026 (or 07.02.2026 as i am german :D ) somewhere in every line.

If you leave your PC alone for some days and want to check the errors/warnings once in a while it would help to see on which day it happened.
Of course this is a nice-to-have.

Is this already possible, and i am just to stupid to find the answer? Or is it not possible?

Using Debian Linux btw.

Thanks!
ImageImage
toTOW
Site Moderator
Posts: 6537
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Configure Log File to show date?

Post by toTOW »

Writing the date at each line would add too much data to the log ...

The date is printed at the beginning of the log and also every time a core is started. Also, the log in v8 rotates everyday at midnight, so you should only have current day logs in current log.
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
Ikaar
Posts: 10
Joined: Tue Oct 08, 2024 3:10 pm

Re: Configure Log File to show date?

Post by Ikaar »

I know this would make the log file larger. But i was hoping to format the log file to make this optional available.
Also i would want to make the logfile to stay longer, so i can check after a few days.

Interestingly my log stayed for longer than a day.
I looked up the file yesterday via remote and was shocked how many errors i had. Than i recognized that those were from last week when i testet something new on my system. Now everything is fine again as it should be.
ImageImage
Joe_H
Site Admin
Posts: 8337
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Studio M1 Max 32 GB smp6
Mac Hack i7-7700K 48 GB smp4
Location: W. MA

Re: Configure Log File to show date?

Post by Joe_H »

The v7 client inserted a date stamp into the log every 6 hours as I recall. It was not directly controllable by an open setting in Web Control or FAHControl, but an Expert option could be set to change how many seconds would go between date stamps.

There is a difference between what you see in the log window of the v8 Web Control and what is stored as logs on disk. As stated by toTOW, the log rotates every 24 hours and older ones up to 99 by default are stored in a logs subdirectory. However Web Control will display several days or weeks worth in the log window. I haven't figured out how far back is determined, it may be the last time the client was restarted on the system.

There may be a way of changing the log rotation from every 24 hours, but I haven't dug into that. Some values not settable through Web Control are read from a config.xml file if it exists when fah-client is started. Originally that was just to bring over values set for v7 to use when updating to v8, but it also worked to do some of the Expert level changes from defaults.

You could request an enhancement on the GitHub for the client to add periodic date stamps similar to what existed in the v7 client. I haven't checked to see if that has already been requested before.
Image
calxalot
Site Moderator
Posts: 1829
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Configure Log File to show date?

Post by calxalot »

Available log options that can be put in config.xml can be seen with

Code: Select all

fah-client --help
The help output is deceptive about xml format. All values need to be expressed as strings.
calxalot
Site Moderator
Posts: 1829
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Configure Log File to show date?

Post by calxalot »

What you want might be

Code: Select all

<config>
  <log-date v='true'/>
</config>
Post Reply