File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const (
1414 ShopField = "shop"
1515 CheckoutField = "checkout"
1616 OrderField = "order"
17+ TransactionField = "transaction"
1718 CheckoutDeviceField = "checkoutDevice"
1819 DurationField = "duration"
1920 FlakyField = "flaky"
@@ -90,6 +91,10 @@ func (logger *Logger) WithOrder(order string) *Entry {
9091 return NewEntry (logger ).WithField (OrderField , order )
9192}
9293
94+ func (logger * Logger ) WithTransaction (txn string ) * Entry {
95+ return NewEntry (logger ).WithField (TransactionField , txn )
96+ }
97+
9398type Entry struct {
9499 * logrus.Entry
95100}
@@ -164,6 +169,10 @@ func (entry *Entry) WithOrder(orderID string) *Entry {
164169 return entry .WithField (OrderField , orderID )
165170}
166171
172+ func (entry * Entry ) WithTransaction (txnID string ) * Entry {
173+ return entry .WithField (TransactionField , txnID )
174+ }
175+
167176// Deprecation marks the log entry with type "deprecation". This is used for log entries, that are logged during a
168177// feature change. Logs with "deprecation" types should not be considered as critical and should only occur temporarily
169178// during the transition.
You can’t perform that action at this time.
0 commit comments