]> _ Git - remote-logging.git/commitdiff
server: Remove .log and .cmdlog suffixes
authormivirl <>
Wed, 7 Feb 2024 16:57:01 +0000 (10:57 -0600)
committermivirl <>
Wed, 7 Feb 2024 17:00:12 +0000 (11:00 -0600)
Removed suffixes from uploaded files since the prefixes already identify
the type of file, and many logs already have the .log suffix which
results in names like "L__service.log.log".

README.md
src/server.sh

index 3a1d7a1e7f0051580865862cb9382576cb8cd849..159099a49ffd782812edfc698b65444a085d7ea0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -61,9 +61,9 @@ server in `srv/clients/` with the following naming scheme:
 - `_info.txt` - Contains basic information about the client
 - `_processes.log` - Log of processes as they are run on the client
 - `F__filepath` - Files that are transferred once
-- `L__logpath.log` - Log files that are continuously transferred, new lines are
+- `L__logpath` - Log files that are continuously transferred, new lines are
    transferred as they are written on the client
-- `C__commandname.cmdlog` - Command output, continuously transferred
+- `C__commandname` - Command output, continuously transferred
 
 Logs can be monitored as they come in using `lnav`:
 
index b732d0892c94fc3cc654bfdad92f871ab82447a1..0a9bc89cda8978ba6ae00fedce7dcdad037c8d62 100644 (file)
@@ -139,16 +139,16 @@ while read -r COMMAND; do
     elif [ "$COMMAND" = "log" ]; then
         echo -n "Filename: "
         read -r TMPFILENAME
-        verify_input "L__${TMPFILENAME}.log"
-        print_status write_to_file "L__${TMPFILENAME}.log"
+        verify_input "L__${TMPFILENAME}"
+        print_status write_to_file "L__${TMPFILENAME}"
         unset TMPFILENAME
 
 
     elif [ "$COMMAND" = "command" ]; then
         echo -n "Filename: "
         read -r TMPFILENAME
-        verify_input "C__${TMPFILENAME}.cmdlog"
-        print_status write_to_file "C__${TMPFILENAME}.cmdlog"
+        verify_input "C__${TMPFILENAME}"
+        print_status write_to_file "C__${TMPFILENAME}"
         unset TMPFILENAME