mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
const { Transport } = require("winston");
|
|
|
|
class DiscordWinstonTransport extends Transport {
|
|
constructor(channel) {
|
|
super();
|
|
this._channel = channel;
|
|
}
|
|
|
|
async log(info, callback) {
|
|
const { message, ...rest } = info;
|
|
await this._channel.send(`${message}`);
|
|
// Perform the writing to the remote service
|
|
callback();
|
|
}
|
|
}
|
|
|
|
module.exports = DiscordWinstonTransport;
|