We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2c5a23 commit c7a7cd6Copy full SHA for c7a7cd6
1 file changed
export.sh
@@ -25,9 +25,8 @@ if [ -f "$ROTATED_LOG_FILE" ]; then
25
sleep 10
26
27
# Get the uploaded log file name
28
- TIMESTAMP=$(date +"%Y%m%dT%H00Z") # Cron runs on the hour, so we round to the hour
29
HASH_SUFFIX=$(cksum "$ROTATED_LOG_FILE" | cut -d ' ' -f 1 | cut -c1-8)
30
- S3_KEY="${TIMESTAMP}_HASH${HASH_SUFFIX}_access.log.zst"
+ S3_KEY="$(date +"%Y")/$(date +"%m")/$(date +"%d")/$(date +"%H")00_HASH${HASH_SUFFIX}_access.log.zst"
31
32
# Compress the rotated log before upload
33
if ! zstd -19 -q -c "$ROTATED_LOG_FILE" > "$S3_KEY"; then
0 commit comments