Coder Social home page Coder Social logo

Comments (2)

Tastyep avatar Tastyep commented on May 27, 2024

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.

aserowy avatar aserowy commented on May 27, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.