0

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]
Yijun
  • 433
  • 1
  • 3
  • 9

2 Answers2

0

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

Philip Hallstrom
  • 19,673
  • 2
  • 42
  • 46
0

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

jamesc
  • 12,423
  • 15
  • 74
  • 113