Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logfile add date
#1
Hi there,

Is it possible to add the date to the filename of the logfile, so every day a unique file is created?

function ~s [flags] [$logfile] ;;flags: 1 date/time

i don't know how to implement the $logfile filename so it adapts to the systems date.

someone an idea?

TIA

freggel
#2
Create other function that formats log file path with current date and calls LogFile. Use the function instead of LogFile.

Code:
Copy      Help
;/
function ~s [flags]

_s.time("$my qm$\log-%x.txt")
_s.findreplace("/" "-")
LogFile s flags _s


Forum Jump:


Users browsing this thread: 2 Guest(s)