File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66abstract class AbstractLog extends \Jaeger \Thrift \Log
77{
8- public function __construct (array $ tags = [])
8+ public function __construct (array $ tags = [], int $ timestamp = 0 )
99 {
10- $ this ->timestamp = (int )round (microtime (true ) * 1000000 );
10+ $ this ->timestamp = $ timestamp ?? (int )round (microtime (true ) * 1000000 );
1111 $ this ->fields = $ tags ;
1212 parent ::__construct ();
1313 }
Original file line number Diff line number Diff line change 55
66class ErrorLog extends AbstractLog
77{
8- public function __construct (string $ message , string $ stack )
8+ public function __construct (string $ message , string $ stack, int $ timestamp = 0 )
99 {
1010 parent ::__construct (
1111 [
1212 new EventTag ('error ' ),
1313 new MessageTag ($ message ),
1414 new StackTag ($ stack )
15- ]
15+ ],
16+ $ timestamp
1617 );
1718 }
1819}
Original file line number Diff line number Diff line change 55
66class UserLog extends AbstractLog
77{
8- public function __construct (string $ level , string $ message )
8+ public function __construct (string $ level , string $ message, int $ timestamp = 0 )
99 {
1010 parent ::__construct (
1111 [
1212 new EventTag ('log ' ),
1313 new LevelTag ($ level ),
1414 new MessageTag ($ message ),
15- ]
15+ ],
16+ $ timestamp
1617 );
1718 }
1819}
You can’t perform that action at this time.
0 commit comments