shellnotes/docs/system/loggingsystem.txt

55 lines
2.4 KiB
Text
Raw Normal View History

2021-03-31 12:45:36 +02:00
shellnotes logging system
=========================
2023-08-21 16:49:52 +02:00
The shellnotes logging system consists of .cpp (C++) files, that are precompiled and run
if an error occurs while using shellnotes.
2021-03-31 12:45:36 +02:00
Errors that might occur:
update.sh / bash_update.sh:
-Shellnotes is not installed
-Shellnotes is up-to-date
-There is no internet connection
install.sh:
-Shellnotes is already installed
-A file in the downloaded source code is broken
-The system doesn't meet the requirements (requirements.txt)
-The user's shell is not supported
shellnotes -sd / shellnotes --set-defaults / set_defaults.sh:
-The path given is not valid
-The default editor or folder is already the default
uninstall.sh:
-Shellnotes is not installed
-A file in the downloaded source code is broken
-Shellnotes is disabled
uninstall.sh (disabling option 2):
-Shellnotes is already disabled
-Shellnotes is uninstalled
uninstall.sh (enabling option 3):
-Shellnotes is already enabled
-Shellnotes is uninstalled
2023-08-21 16:49:52 +02:00
SnE (Shellnotes Notes Editor):
-Note name is invalid (i.e. "")
-Github Token is not set (when pasting to Gists, do shellnotes -ght)
-Failed to save a new note
2021-03-31 12:45:36 +02:00
If any of the above errors occur in runtime, the matching .cpp file found in ~/.shellnotes/util/failed/
write a report of the error containing the type of error and the date in the matching logfiles found in ~/.shellnotes/logs/.
2023-08-21 16:49:52 +02:00
For SnE, since it is a python script, the loguru module is being used everytime an error occurs and is saved to ~/.shellnotes/sne/logs/.
2021-03-31 12:45:36 +02:00
Opening the logfiles:
-Do NOT open the files manually using any text editor. Use "shellnotes --logs" to select a logfile and check it.
Logfiles and content:
~/.shellnotes/logs/disfailed.txt - failed attempt to disable shellnotes.
~/.shellnotes/logs/enfailed.txt - failed attempt to enable shellnotes.
~/.shellnotes/logs/ifailed.txt - failed attempt to install shellnotes.
2021-03-31 12:45:36 +02:00
~/.shellnotes/logs/uninfailed.txt - failed attempt to uninstall shellnotes.
~/.shellnotes/logs/ufailed.txt - failed attempt to update shellnotes.
2023-08-21 16:49:52 +02:00
~/.shellnotes/sne/logs/ - errors/info while running SnE.
2021-03-31 12:45:36 +02:00
To close a file after you chose to open it, press "Q". Shellnotes uses the less command to view
its logfiles.
2021-03-31 12:45:36 +02:00
Clearing all the logfiles:
-There is a hidden function called "clearlogs" in the /util directory. When run, it clears all the content from all logfiles. This can be useful for saving space on the disk. It can be run by writing "clearlogs" in the terminal.