what the meaning of the hex string in capstrinao

59 views Asked by At

When i deploy rails project with capstrinao, there were always a hex string at every line, like "82ced5e5". what is it use for?

INFO[82ced5e5]
DEBUG[b2d2eb7c]
2

There are 2 answers

0
jamesc On BEST ANSWER

You get the same hex code for related output allowing you to identify easily corresponding commands for example the following start and finish commands

INFO[3f6437b7] Running /usr/bin/env echo...

followed some time later with the potential for a lot of other output in between by

INFO[3f6437b7] Finished in 0.180 seconds with exit status 0 (successful).

Making it simple to determine which command has just finished.

This is just a simple example but should be enough to demonstrate the usefulness of the hex code

0
Philip Hallstrom On

It actually comes from Sshkit's logging. Start down the rabbit hole here:

https://github.com/capistrano/sshkit/blob/master/lib/sshkit/formatters/pretty.rb