You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see logging feature, especially logging of custom actions; there's no way to debug and see the output of the command
Git command logging should also be useful and may help with bug reports
For starters, a simple log to file will work (Serilog or NLog), but an in-app log viewer could be added later
If a git command fails, SourceGit shows the output of it (except progress lines) as error message.
This is true, but sometimes there is no error, but git fails in some way, like it was in #449, I believe logging will help to debug
I think simple file-based logging is enough, if you write them to logs/ inside the SourceGit data dir, the user can access them with "Open App Data Dir". The logs can be separated into custom-actions-YYYYYMMDD.log and git-YYYYMMDD.log.
对于初学者可以学习,点击之后的命令。个人认为非常有用
I'm not sure if this will be usable for newbies as some of the commands executed are very long and verbose. To make it really useful, something like "Git Console" needs to be added to show only "useful" commands. In my opinion, not some git command log with no descriptions, but the progit book (or any other of your choice) is a better study material 😁
One of the questions I considered was when to delete the log files. After a period of accumulation, the log files may take up a lot of space. And this is hard for most users to notice.
The problem with #449 will not actually be solved by adding the log. The key reason of it is that the output of git diff is empty due to an external diff driver.
For custom actions, SourceGit currently captures the output of stderr, and if the action fails (e.g. the exit code of it is not 0), an error message will pop up.
One of the questions I considered was when to delete the log files. After a period of accumulation, the log files may take up a lot of space. And this is hard for most users to notice.
With serilog you can specify retainedFileCountLimit to keep last `N files (31 by default)
For custom actions, SourceGit currently captures the output of stderr, and if the action fails (e.g. the exit code of it is not 0), an error message will pop up.
Activity
love-linger commentedon Nov 15, 2024
If a git command fails, SourceGit shows the output of it (except progress lines) as error message.
I'll consider how to handle and show logs of custom action.
heartacker commentedon Nov 15, 2024
对于初学者可以学习,点击之后的命令。个人认为非常有用
aikawayataro commentedon Nov 15, 2024
This is true, but sometimes there is no error, but git fails in some way, like it was in #449, I believe logging will help to debug
I think simple file-based logging is enough, if you write them to
logs/inside the SourceGit data dir, the user can access them with "Open App Data Dir". The logs can be separated intocustom-actions-YYYYYMMDD.logandgit-YYYYMMDD.log.I'm not sure if this will be usable for newbies as some of the commands executed are very long and verbose. To make it really useful, something like "Git Console" needs to be added to show only "useful" commands. In my opinion, not some git command log with no descriptions, but the progit book (or any other of your choice) is a better study material 😁
love-linger commentedon Nov 16, 2024
One of the questions I considered was when to delete the log files. After a period of accumulation, the log files may take up a lot of space. And this is hard for most users to notice.
The problem with #449 will not actually be solved by adding the log. The key reason of it is that the output of
git diffis empty due to an external diff driver.For custom actions,
SourceGitcurrently captures the output of stderr, and if the action fails (e.g. the exit code of it is not 0), an error message will pop up.aikawayataro commentedon Nov 16, 2024
With serilog you can specify
retainedFileCountLimitto keep last `N files (31 by default)stdout log would be useful anyway
aikawayataro commentedon Nov 20, 2024
Logging can also be beneficial for stuff like in #725, e.g. you can log response body on error