Comments (2)
Hello,
Thank you for your interest and kind words.
I think you could achieve that by checking package.loaded:
if package.loaded["structlog"] then ... end
Now, I'm not sure if I understand correctly what you are trying to achieve. Personally, I would replace your logging implementation with structlog
and extend it to your needs by defining new sinks (what you called channel).
If needed, I made a luarocks package.
EDIT: Another idea, you could accept a custom logger when configuring your plugin and fallback to your own implementation (as long as interfaces match)
from structlog.nvim.
ty for the heads up. This is exactly what i need.
To clarify: I do not want to introduce a breaking change to extend logging and force a new plugin (which functionality is not strictly needed for all users) but want to support your (way better and specialized) plugin in an additive way. Thus, somebody (like me in my own config) can introduce your plugin and tmux.nvim will use it if installed.
Kind regards
from structlog.nvim.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from structlog.nvim.