)]}'
{"stack.sh":[{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"d22bf26e94c4fc83a422eb0c5505acfb31ab823b","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    # TODO(dtroyer): need to handle user-specified logfile below in case"},{"line_number":406,"context_line":"    #                it doesn\u0027t end in .log"},{"line_number":407,"context_line":"    LOGDIR\u003d`dirname $LOGFILE`"},{"line_number":408,"context_line":"    find $LOGDIR -name \\*.log -mtime +$LOGDAYS -exec rm {} \\;"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    # Redirect stdout/stderr to tee to write the log file"},{"line_number":411,"context_line":"    exec 1\u003e \u003e( tee \"${LOGFILE}\" ) 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":5,"id":"AAAADH%2F%2F%2FAs%3D","line":408,"updated":"2012-01-03 15:19:10.000000000","message":"I think that would catch every *.log files in the stack directory right? maybe been a bit more specific (there is the swift logs there as well which get auto rotated).","commit_id":"413d7bdc932769c365b24d6bc600216c97e8d863"},{"author":{"_account_id":1082,"name":"Scott Moser","email":"smoser@ubuntu.com","username":"smoser"},"change_message_id":"ae3e846f90d98c223e50febce4de8a2d43f5c2ef","unresolved":false,"context_lines":[{"line_number":402,"context_line":"    # as the template to search for, appending \u0027.*\u0027 to match the date"},{"line_number":403,"context_line":"    # we added on earlier runs."},{"line_number":404,"context_line":"    LOGDAYS\u003d${LOGDAYS:-7}"},{"line_number":405,"context_line":"    LOGDIR\u003d$(dirname $LOGFILE)"},{"line_number":406,"context_line":"    LOGNAME\u003d$(basename $LOGFILE)"},{"line_number":407,"context_line":"    find $LOGDIR -name $LOGNAME.\\* -mtime +$LOGDAYS -maxdepth 0 -exec rm {} \\;"},{"line_number":408,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"AAAADX%2F%2F%2F6o%3D","line":405,"updated":"2012-01-05 19:56:57.000000000","message":"Possibly both a nitpick and unlikely, but here, \"$LOGFILE\" is subject to shell expansion, which is probably not desirable.  Same issue on the next line also.\n\nJust quote it.","commit_id":"6d250d8ee1eed1d340197991ca16fc403a0e5cb5"},{"author":{"_account_id":1082,"name":"Scott Moser","email":"smoser@ubuntu.com","username":"smoser"},"change_message_id":"ae3e846f90d98c223e50febce4de8a2d43f5c2ef","unresolved":false,"context_lines":[{"line_number":406,"context_line":"    LOGNAME\u003d$(basename $LOGFILE)"},{"line_number":407,"context_line":"    find $LOGDIR -name $LOGNAME.\\* -mtime +$LOGDAYS -maxdepth 0 -exec rm {} \\;"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    LOGFILE\u003d$LOGFILE.`date +%F-%H%M%S`"},{"line_number":410,"context_line":"    # Redirect stdout/stderr to tee to write the log file"},{"line_number":411,"context_line":"    exec 1\u003e \u003e( tee \"${LOGFILE}\" ) 2\u003e\u00261"},{"line_number":412,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":6,"id":"AAAADX%2F%2F%2F6w%3D","line":409,"updated":"2012-01-05 19:56:57.000000000","message":"I think it would be nice to not *force* the addition of YYYY-MM-DD-HHMMSS appended to LOGFILE.\n\nNot tested, but one thing you could do is just allow LOGFILE to have date formatting chars in it.  Ie, something like:\nif [ \"${LOGFILE#*%}\" !\u003d \"${LOGFILE}\" ]; then\n  # the LOGFILE has \u0027%\u0027 in it, let \u0027date\u0027 format output\n  LOGFILE\u003d$(date +\"$LOGFILE\")\nfi\n\nThen, if the user set LOGFILE\u003d\"mylog-%F-%H%M%S.log\" then they\u0027d get your formatting.","commit_id":"6d250d8ee1eed1d340197991ca16fc403a0e5cb5"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"1b66d94fe0946e0b09ca8706b7ecac6ad63cbcf2","unresolved":false,"context_lines":[{"line_number":406,"context_line":"    LOGNAME\u003d$(basename $LOGFILE)"},{"line_number":407,"context_line":"    find $LOGDIR -name $LOGNAME.\\* -mtime +$LOGDAYS -maxdepth 0 -exec rm {} \\;"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    LOGFILE\u003d$LOGFILE.`date +%F-%H%M%S`"},{"line_number":410,"context_line":"    # Redirect stdout/stderr to tee to write the log file"},{"line_number":411,"context_line":"    exec 1\u003e \u003e( tee \"${LOGFILE}\" ) 2\u003e\u00261"},{"line_number":412,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":6,"id":"AAAADX%2F%2F%2F2w%3D","line":409,"in_reply_to":"AAAADX%2F%2F%2F6w%3D","updated":"2012-01-05 22:35:31.000000000","message":"The problem with having the user-specified part of the logfile name be variable is what to use in line 407 to search for those files.","commit_id":"6d250d8ee1eed1d340197991ca16fc403a0e5cb5"}]}
