I now want to do the following and was wondering if anyone in the community could point me in a good direction.
I have a log file from abraunegg's onedrive client that outputs stuff like this:
Code: Select all
2022-Jan-16 14:40:14.9203443 Starting a sync with OneDrive
2022-Jan-16 14:40:14.9206537 Syncing changes from OneDrive ...
2022-Jan-16 14:40:16.1507118 Sync with OneDrive is complete
2022-Jan-16 14:40:40.7630634 Retry sync count: 1: Cannot open file `./Untitled Document' in mode `rb' (No such file or directory)
2022-Jan-16 14:40:41.4198398 Moving ./Untitled Document to ./linux_mint_is_great.txt
2022-Jan-16 14:40:41.9391852 Uploading new file ./linux_mint_is_great.txt ... done.
2022-Jan-16 14:40:45.4773655 Uploading new file ./linux_mint_is_great (copy).txt ... done.
2022-Jan-16 14:40:47.8734736 Uploading new file ./linux_mint_is_great (another copy).txt ... done.
2022-Jan-16 14:40:48.1857814 Starting a sync with OneDrive
2022-Jan-16 14:40:48.186048 Syncing changes from OneDrive ...
2022-Jan-16 14:40:49.4558493 Sync with OneDrive is complete
2022-Jan-16 14:40:59.2265195 Deleting item from OneDrive: ./linux_mint_is_great (copy).txt
2022-Jan-16 14:40:59.3837201 Deleting item from OneDrive: ./linux_mint_is_great.txt
2022-Jan-16 14:40:59.5461714 Deleting item from OneDrive: ./linux_mint_is_great (another copy).txt
What I would like is to configure my systemto display notifications for events in the log file above like "Uploading new file ...", "Deleting item from OneDrive...", and other matters I want to display (the alternative is running -tail on the log... but that displays absolutely everything and I won't even notice what events are going on).
So:
1. Is there a way to run system notifications off the log file? e.g. make it notify on every new line to the file?
2. Assuming that is possible, could I then filter only to display the lines starting with "Deleting", "Uploading" or other beginnings for notifications I want?
Thank you!