There is no way currently to add a set of fields to all logs from the opsgenie API since we are accepting a logrus.Logger in the config struct. By changing this to a FieldLogger users will be able to either continue submitting a logrus.Logger, or submit a logrus.Entry with a set of fields they want in all opsgenie logs predefined.
The only adverse effect is that the FieldLogger interface does not have a GetLevel method, meaning I've had to remove that from the printInfoLog function. This doesn't seem like an issue to me, would like opinions on this.
There is no way currently to add a set of fields to all logs from the opsgenie API since we are accepting a logrus.Logger in the config struct. By changing this to a FieldLogger users will be able to either continue submitting a logrus.Logger, or submit a logrus.Entry with a set of fields they want in all opsgenie logs predefined.
The only adverse effect is that the FieldLogger interface does not have a GetLevel method, meaning I've had to remove that from the printInfoLog function. This doesn't seem like an issue to me, would like opinions on this.