martin wrote:
Without all these details, the log file is useless for debugging.
I think there's a real issue here that - whilst it's an enhancement request, not really a bug - should be addressed. Put simply, the log file generated by WinSCP (at loglevel=0), for some purposes (e.g. simple monitoring of whether a historical operation succeeded or otherwise) is too verbose to be usable when running repeatedly as a scheduled task, and including operations which include things like file synchronisation: and I do NOT agree with the statement that removing some of this verbosity would make it "useless".
I appreciate the current loglevel probably IS what you would need if you wanted to do an in-depth analysis of (a) every operation WinSCP performed and (b) the detail of every response it got while performing those operations, including any sub-steps it took to achieve those operations - but for lots of other software the log files do NOT show (b) - they simply record the requested action, and then whether that action was performed successfully or otherwise (if the action failed adding more detail such as the error itself).
A good example is running a repeated WinSCP command line script which includes something like this:
> rm "T2tdata_i????????T??????Z.zip"<2018-01-02
The log file goes on to list every file individually which either matches or does not match the file-pattern filter e.g. multiple lines like this:
> type=file;size=429;modify=20180104110346;UNIX.mode=0644;UNIX.uid=1088;UNIX.gid=1090;unique=803g5d80420; T2tdata_i20180104T110344Z.zip
eventually it states this:
> Directory listing successful
it then lists the matching files again (presumably now analysing the modified times) i.e. multiple lines like this:
> T2tdata_i20180103T003534Z.zip;-;291;2018-01-03T00:35:37.000Z;3;"1088" [0];"1090" [0];rw-r--r--;0
and then eventually you get something like this:
> Script: No file matching 'T2tdata_i????????T??????Z.zip<2018-01-02' found.
in the example above, that single operation took 303 lines to record in the log (as a side-issue I suspect the recording of the log at this level of detail might be slowing down the script).
there is clearly an argument - in my view - to introduce some kind of WinSCP loglevel (e.g. "-1") which simply records requested actions and end result e.g. in the case above just:
> rm "T2tdata_i????????T??????Z.zip"<2018-01-02
> Script: No file matching 'T2tdata_i????????T??????Z.zip<2018-01-02' found.
but still - if an error arises - then listing details of what the error is. it's not uncommon to even see stuff like this in other software logs:
> loglevel is currently set to -1 please set to 0 to record more detail about the requested operation