script-server
script-server copied to clipboard
Script Logging
Hi, I have a couple scripts that I dont want the output saved anywhere. I'm ok with being aware a script was run in logging, but I dont want the output saved anywhere locally. That includes if a file needs to be downloaded. Obviously i'm ok the user downloads the file but I dont want a local copy saved of the file.
Thanks.
Hi @dragonborn117 unfortunately this is not possible. You can add a callback to script server, which would remove the files after a script is finished, see for the usage. https://github.com/bugy/script-server/issues/200#issuecomment-478363470
I have also encountered this issue. I have several scripts that run continuously, generating about 10MB of log files per hour. I tried to delete these log files but they were being used by Python. Here's an idea: could I run an additional script to clear the contents of these log files and then save them?
Hi @dragonborn117 unfortunately this is not possible. You can add a callback to script server, which would remove the files after a script is finished, see for the usage. #200 (comment)
I have several scripts that run continuously, generating about 10MB of log files per hour. I tried to delete these log files but they were being used by Python.
This is a different problem - you have log files that never close. You have a couple of options, maybe...
Easy option, if it works: rename the log file, and then send the process a HUP signal. If this works, the renamed file will close, and the process will open a new file with the original name. Then you can actually delete the old file.
Harder option, if that doesn't work: Your script will need to track how much data has been logged, and do the close-rename-reopen process itself.
On Wed, Dec 18, 2024, 3:37 PM xueli12 @.***> wrote:
I have also encountered this issue. I have several scripts that run continuously, generating about 10MB of log files per hour. I tried to delete these log files but they were being used by Python. Here's an idea: could I run an additional script to clear the contents of these log files and then save them?
Hi @dragonborn117 https://github.com/dragonborn117 unfortunately this is not possible. You can add a callback to script server, which would remove the files after a script is finished, see for the usage. #200 (comment) https://github.com/bugy/script-server/issues/200#issuecomment-478363470
— Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/770#issuecomment-2552222856, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HBI3TQJOE6PBBTNNJZPZT2GHMG5AVCNFSM6AAAAABONVA5FSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGIZDEOBVGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>