mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-29 14:08:31 +00:00
4.0.0-rc13.11
* Added: Debug Log generation and easy uploading for issue reports. * Fixed: Bug with chat lines not having a state causing rendering to crash. * Fixed: Add an error boundary around the custom FFZ Emote Menu to catch errors, displaying feedback and sending error reports rather than silently failing. * Fixed: Typo in Fine when logging errors. * Changed: Update chat types with the latest values from Twitch's source. * Changed: Update the GitHub issue template with instructions on uploading logs from v4.
This commit is contained in:
parent
cb2f2b19ee
commit
d6504757b3
18 changed files with 413 additions and 99 deletions
|
@ -10,9 +10,14 @@ const RAVEN_LEVELS = {
|
|||
|
||||
export default class Logger {
|
||||
constructor(parent, name, level, raven) {
|
||||
this.root = parent ? parent.root : this;
|
||||
this.parent = parent;
|
||||
this.name = name;
|
||||
|
||||
if ( this.root == this )
|
||||
this.captured_init = [];
|
||||
|
||||
this.init = false;
|
||||
this.enabled = true;
|
||||
this.level = level || (parent && parent.level) || Logger.DEFAULT_LEVEL;
|
||||
this.raven = raven || (parent && parent.raven);
|
||||
|
@ -68,6 +73,14 @@ export default class Logger {
|
|||
|
||||
const message = Array.prototype.slice.call(args);
|
||||
|
||||
if ( this.root.init )
|
||||
this.root.captured_init.push({
|
||||
time: Date.now(),
|
||||
category: this.name,
|
||||
message: message.join(' '),
|
||||
level: RAVEN_LEVELS[level] || level
|
||||
});
|
||||
|
||||
this.crumb({
|
||||
message: message.join(' '),
|
||||
category: this.name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue