Hi
My newbie question is:
Time stamping the time lapse log files?
My code writing skills are nill, it confuses me!
This F15.log isn't perfect but its much better than the logs I get with F16.
At least the values are in columns even if they aren't aligned perfectly with the labels. The F16 code is much shorter than F15 and looks much simpler. Is that because all the work is being done in the lualib ,folder instead of the script itself?
Is F15 code being more complicated why the logs look so different or maybe the header code?
Anyway it saves every log as "F15.log"' and I have to change the names manually when there are more than one in a day.
What I would like is for the script to save the logs as the "Script Name" ie (F15.Log_.Date/Time)
I think I found the code but don't know where it goes so it works correctly. Can I add the same code to a different script so it will save a log or does it need to be specific to each script?
Any help would be Greatly Appreciated!Am I on the right track with any of these?
print_screen(os.date("%H%M"))
print(os.date())
--------------------------------------------------------
function restore()
print_screen(2) -- closes LOG_0001.TXT so you can rename it
os.rename("A/CHDK/LOGS/LOG_0001.TXT","A/CHDK/LOGS/"..os.date("%m%d%H%M")..".LOG")
end
print_screen(1)
print(os.date())
----------------------------------------------------------
logfile,msg=io:open("A/log"..log_id.."txt","wb")
if not logfile then
error("couldn't open log file" .. msg)
end
-- ... loop with MD stuff
logfile:write("MD ",n,":",os.date("%Y-%m-%d %H:%M:%S"),"\n")
-- ... MD loop
logifle:close()
-----------------------------------------------------------------------------