Log the WriteFreely version on startup

I just went to file a bug and one of the questions was what version of WriteFreely I was using. To be sure that I wasn’t misremembering, I figured I’d check the log for a version, but it isn’t present:

Aug 03 21:40:54 wrestle writefreely[23287]: 2019/08/03 21:40:54 Loading config.ini configuration...
Aug 03 21:40:54 wrestle writefreely[23287]: 2019/08/03 21:40:54 Loading templates...
Aug 03 21:40:54 wrestle writefreely[23287]: 2019/08/03 21:40:54 Loading pages...
Aug 03 21:40:54 wrestle writefreely[23287]: 2019/08/03 21:40:54 Loading user pages...
Aug 03 21:40:55 wrestle writefreely[23287]: 2019/08/03 21:40:55 Loading encryption keys...
Aug 03 21:40:55 wrestle writefreely[23287]: 2019/08/03 21:40:55 Connecting to sqlite3 database...
Aug 03 21:40:55 wrestle writefreely[23287]: 2019/08/03 21:40:55 Adding write.wrestle.town routes (multi-user)...
Aug 03 21:40:55 wrestle writefreely[23287]: 2019/08/03 21:40:55 Going to serve...

This would be a nice little improvement for bug reporters/administrators, I think.

From command line writefreely -v (see admin commands). Version doesn’t belongs to the log.

Thanks for the response! Binaries can be replaced or deleted without affecting the processes running from them (on Linux, at least), so writefreely -v can only tell me what version I would be running if I launched a new writefreely process, not what version I currently have running.

1 Like

(This seems like a pretty small change, so I’m going to see if I can contribute this myself.)

I’ve submitted: