Add timestamp to debug log #5203
Comments
@uchagani how would having timestamps help solve this issue? Maybe I am misunderstanding, but the logs should be sequential. |
I'm using vagrant as part of a CI Build/Deploy/Test cycle. I am noticing a strange behavior in one of the apps I am testing where, when another vagrant box is spun up, the port-forwarding of the new box, causes a network glitch in boxes that are already spun up. I'm trying to narrow down where in the vagrant log this is happening. I already have timestamps from my app regarding the crash and i wanted to line that up with the vagrant log to see what exactly in vagrant is causing the problem. |
Add this at start of your Vagrantfile, it helps me:
It gives me (console + debug.log) :
|
Solid feature idea, maybe submit a PR? |
See PR #9175 |
Great @philippe-granet !!! I've just improved your solution placing the code in a different file called timestamp-logger.rb and adding just one line of code at the start of my Vagrantfile: load 'timestamp-logger.rb' |
A PR has been merged : #9269 |
I'm going to go ahead and close this now that #9269 has been merged. Thanks! |
I'm going to lock this issue because it has been closed for 30 days If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I've requested a similar feature before but now I'm asking for timestamps to be added to at least the debug logs.
I've trying to isolate a problem with bringing up machines and have isolated a port forwarding issue. However I can't isolate to a single place in the log file because it everything is going by so fast. I'd like to be able to compare timestamps from when I see the error and what is happening in the logs.
The text was updated successfully, but these errors were encountered: