Using Nebula in a manage package? #270
-
Hi @jongpie, I currently developing a managed package, and I have a stupid question, can I use Nebula to log data from my apex class? If it's possible, I'm wondering how should I write my APEX code to run & compile in case Nebula is not deployed on my org. Hoping my questions are clear enough, because I'm still a beginner in the managed package world :) Thanks a lot for your answer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
@dcuenot hi there! I develop unmanaged packages, but the general strategy I employ you may find helpful - I have a suite of plugins for my package, including one for Nebula Logger. If you combine that with my sfdx-project.json, you can see how the Nebula Logger plugin declares a dependency for both packages. By creating a second package, you break the tight coupling that would otherwise occur by declaring Nebula Logger as a dependency for your own package, and give subscribers easy ways to opt into using the functionality surrounding Nebula. Hopefully that answer helps. I'm also planning (at some point) to write an article & wiki section here about this. |
Beta Was this translation helpful? Give feedback.
@dcuenot hi there! I develop unmanaged packages, but the general strategy I employ you may find helpful - I have a suite of plugins for my package, including one for Nebula Logger. If you combine that with my sfdx-project.json, you can see how the Nebula Logger plugin declares a dependency for both packages. By creating a second package, you break the tight coupling that would otherwise occur by declaring Nebula Logger as a dependency for your own package, and give subscribers easy ways to opt into using the functionality surrounding Nebula.
Hopefully that answer helps. I'm also planning (at some point) to write an article & wiki section here about this.