Custom logger transport
Hello
is they a way to set custom logger transport (like what winston allow to do) with sapphire logger (plugin logger) ?
I saw other ppls also want similar things/support with winston
16 Replies
there isn't, you'll have to make your own plugin. If you do, please let us know through a PR to the "awesome-sapphire" repo because as you noted other people have asked before, but we never hear back from them afterwards.
i can do it but i can't ensure i can maintain it
(because i have the worst time management of all time)
dont we all
it's still better than nothing tbh
the question i have rn about that is : how should ppls being able to add transport ? directly interact with winston ? custom way with sapphire ?
I'd say make a plugin along the lines of
sapphire-logger-winston
then let them put in their own winston options?
I have never used winston so I can't really sayok ok thx
GitHub
GitHub - sapphiredev/sapphire-template: Template to be used for Sap...
Template to be used for Sapphire Project repositories - sapphiredev/sapphire-template
it's now part of https://github.com/sapphiredev/examples
GitHub
GitHub - sapphiredev/examples: Various examples of setting up your ...
Various examples of setting up your bot with the Sapphire Framework - sapphiredev/examples
i dont see plugin example but more framework use exampels
examples*
oh yeah no there aren't any "examples" in that form for plugins, for that ref er to https://github.com/sapphiredev/plugins (you can drop the mono repo structure)
GitHub
GitHub - sapphiredev/plugins: Plugins for the Sapphire Framework
Plugins for the Sapphire Framework. Contribute to sapphiredev/plugins development by creating an account on GitHub.
thx and last question: where can i ask opinions about things related to how to organise that plugin ? like what should i made publicy available and how
#Coding
thx
It's really silly to force such a basic logger. I didn't feel like making a plugin, but this might help you @WeeskyBDW:
Basically, overriding the sapphire client with a custom client and then making my own method in the class of that custom client to use whatever log lib while keeping the fruity logs. This is a lazy way to do it, but typescript is happy so I am happy.
Thx, doing a plugin would more be to allow anyone to use wilston logging librairie easly
but for sure anyone can implement it manually
Yeah, that'd be great. Just wanted to put forward a simple solution in case it could help you. 🙂