github.com/blend/go-sdk@v1.20220411.3/logger/filter.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package logger 9 10 import ( 11 "context" 12 ) 13 14 // Filter mutates an event. 15 // 16 // It should return the modified event, and a bool indicating if we should 17 // drop the event or not. False means we should continue to log the event 18 // `true` would indicate we should *not* trigger listeners or write output 19 // for the given event. 20 type Filter func(context.Context, Event) (e Event, filter bool)