Closed percula closed 5 months ago
Where do you get the error, stackTrace and message data from your OutputEvent? My class contains only two fields in version 1.1.0:
class OutputEvent {
final Level level;
final List<String> lines;
OutputEvent(this.level, this.lines);
}
Where do you get the error, stackTrace and message data from your OutputEvent? My class contains only two fields in version 1.1.0:
class OutputEvent { final Level level; final List<String> lines; OutputEvent(this.level, this.lines); }
Yeah, unfortunately they're not included in OutputEvent
, I had to add them as part of this PR.
I strongly vote for this PR: this feature is important. Many log/crashlytics providers like sentry need typed data (ex. StackTrace, error reason, error object, etc.) which are lost when we are using only list of strings in LogOutput. I suggest we add something like origin = LogEvent()
field to LogOutput to enable more granural outputs using Firebase/Sentry/other providers which needs access to fields of original event, but not the list of strings as it is now. Or use @percula's approach.
@leisim Please merge it. it is helpful.
Closing as this appears to be implemented via OutputEvent.origin
This PR lays the groundwork for adding a FirebaseOutput (see below snippet), which I will be uploading as a separate package on pub.dev due to its dependency on Firebase Crashlytics. To be useful, Firebase needs the message, error, and stack trace, so this PR adds those to the OutputEvent. Once this is merged and released in logger, I'll know what version to use as the minimum version for the logger dependency in the FirebaseOutput package.