Open joshuaquek opened 6 years ago
One possible implementation:
const {Signale} = require('signale');
const options = {
types: {
error: {
done: (message) => {
// Do whatever you want with the logged msg. Log to DB etc.
}
},
success: {
done: (message) => {
// Do whatever you want with the logged msg. Log to DB etc.
}
}
}
};
const custom = new Signale(options);
custom.error('Custom Error Log');
custom.success('Custom Success Log');
Any update on this issue?
Really could do with this being implemented...
+1!
Is your feature request related to a problem? Please describe. Would it be possible to allow one to set a global callback for each individual log type? Like whenever one calls .success() , it would run a particular callback globally, and if one calls .error() it would also run another global callback etc....same for all of the other logging commands.
Describe the solution you'd like Allow one to set a global callback for each log command. Success, Error, Fatal, Info... etc etc