Log is great! 2 Suggestions:
Moderators: Hacker, petermad, Stefan2, white
Log is great! 2 Suggestions:
The potential to parse the log file and produce an AHK or VBS or BAT script is really wonderful. I have already starting using the log as an activity "recorder"... that is, parsing the contents of the log and converting them to bat files for future re-use.
Currently my code identifies spaces in the logfile in order to separate the dates from the commands and filenames and so-on. It would help if TC supported:
1. A fixed-width date/time format in the log
This would make parsing the line slightly faster. Currently the time values are variable-width.
2. An internal command to put a separator or comment in the log
Though I guess it is easy-enough to write an external utility for this, something like cm_PostLogComment with a popup dialog that would allow me to enter some text to be posted in the log.
It would be helpful if I could store some default text for the command in the TC ini file.
Currently my code identifies spaces in the logfile in order to separate the dates from the commands and filenames and so-on. It would help if TC supported:
1. A fixed-width date/time format in the log
This would make parsing the line slightly faster. Currently the time values are variable-width.
2. An internal command to put a separator or comment in the log
Though I guess it is easy-enough to write an external utility for this, something like cm_PostLogComment with a popup dialog that would allow me to enter some text to be posted in the log.
It would be helpful if I could store some default text for the command in the TC ini file.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Should be doable.A fixed-width date/time format in the log
Hmm, what for?An internal command to put a separator or comment in the log
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Hi Christian
This log thing is really excellent. Has got me quite excited, actually.
Having a comment in the log would help me distinguish groups of file operations related to specific objectives. This would be helpful for a log parser (either myself or code I have written) to search for and identify sections of the log relevant to a particular project, even if it has been several days since.
I might want to post a simple divider for instance:
[face=courier]11/09/2006 12:00:02 PM Program Start
=========================================
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
Or I might add some info:
[face=courier]11/09/2006 12:00:02 PM Program Start
=====Setup test SMJ Project environment==
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
Or even blank lines:
[face=courier]11/09/2006 12:00:02 PM Program Start
=====Setup test SMJ Project environment==
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
This log thing is really excellent. Has got me quite excited, actually.
Having a comment in the log would help me distinguish groups of file operations related to specific objectives. This would be helpful for a log parser (either myself or code I have written) to search for and identify sections of the log relevant to a particular project, even if it has been several days since.
I might want to post a simple divider for instance:
[face=courier]11/09/2006 12:00:02 PM Program Start
=========================================
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
Or I might add some info:
[face=courier]11/09/2006 12:00:02 PM Program Start
=====Setup test SMJ Project environment==
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
Or even blank lines:
[face=courier]11/09/2006 12:00:02 PM Program Start
=====Setup test SMJ Project environment==
11/09/2006 12:00:59 PM NewFolder etc.
11/09/2006 12:01:21 PM NewFolder etc.
11/09/2006 12:01:49 PM Copy etc. etc.
=========================================
11/09/2006 12:06:02 PM Move etc. etc.[/face]
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
Another request related to logs:
Log version info is currently written to the log file name AFTER the extension:
[face=courier]TCLog.txt
TCLog.txt.20061105
TCLog.txt.20061106
TCLog.txt.20061107[/face]
Would you consider placing the date/version info prior to the extension?
[face=courier]TCLog.txt
TCLog.20061105.txt
TCLog.20061106.txt
TCLog.20061107.txt[/face]
The reason for the request is simply that using the date as the extension breaks the Lister plugin-association for the extension and causes QuickView (for instance) to revert to the built-in lister instead of the plugin assigned to that filetype.
Log version info is currently written to the log file name AFTER the extension:
[face=courier]TCLog.txt
TCLog.txt.20061105
TCLog.txt.20061106
TCLog.txt.20061107[/face]
Would you consider placing the date/version info prior to the extension?
[face=courier]TCLog.txt
TCLog.20061105.txt
TCLog.20061106.txt
TCLog.20061107.txt[/face]
The reason for the request is simply that using the date as the extension breaks the Lister plugin-association for the extension and causes QuickView (for instance) to revert to the built-in lister instead of the plugin assigned to that filetype.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
SanskritFritz,
Roman
Code: Select all
FileAppend, ==================, %TEMP%\log.txt
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
2Hacker
I almost fell offended now
Well, obviously that was not my question. I rather think that JohnFredC has built a convenient way to put some info into the logfile from within TC.
Another concern: what if both programs (AHK and TC) try to open the logfile simultaneously for writing?
I almost fell offended now

Another concern: what if both programs (AHK and TC) try to open the logfile simultaneously for writing?
I switched to Linux, bye and thanks for all the fish!
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will consider that. It will break current log file rotation, though because the names no longer match.Would you consider placing the date/version info prior to the extension?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
Not really, I just put something together real fast. The AHK code is 1 line:SanskritFritz wrote: I rather think that JohnFredC has built a convenient way to put some info into the logfile from within TC.
[face=courier]FileAppend,%1%`n,LogFilePathSpecHere[/face]
Replace that last parameter with the name/path of the text file (ie., log) in question. I compiled this line (for convenience) and put the executable on a TC button with the following Parameters line:
[face=courier]?=====================[/face]
So when I click the button on the TC toolbar, the TC ? dialog appears with the default text displayed, which I can then override with any appropriate text, making sure to use quotes when spaces are involved.
That certainly could be an issue sometimes, but probably not often, at least for me.SanskritFritz wrote:Another concern: what if both programs (AHK and TC) try to open the logfile simultaneously for writing?
Last edited by JohnFredC on 2006-11-10, 22:51 UTC, edited 1 time in total.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I cannot confirm this here - can you post a small part of your log file with this problem, please?Currently the time values are variable-width.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com