Hey, I hope this is an appropriate place for a LogBox question.
So, I want to use it, both in our single ColdBox app, but also in other apps. The issue is how it will auto-create the tables it needs. Is there a way to make it NOT do that, and let us create them manually? Our IT department REFUSES to allow a DSN the ability to do that. I’ve read through the instructions and haven’t seen anything about doing the setup manually.
I hope this is an appropriate place for a LogBox question.
Yep!
Is there a way to make it NOT do that,
I assume you’re asking about the DB Appender that ships with LogBox. Just set autoCreate to false in the appender config. You can read about it here in our docs:
Also keep in mind, you can create your own DB Appender if you want to have a more complex table structure. I usually create a custom appender with many more columns and my appender pulls the appropriate additional information out of the session/app.
While I have you here, lemme ask you this too… we have thirty-some non-ColdBox apps that we may want to add LogBox to. Would it be possible to have one global instance of LogBox and then configure it so that each application will get its own table in a central “logging” database, or do we need a separate database for each one? OR, could we just use the app’s own database? What do you suggest/recommend?
As it is, it’s already an uphill fight. ColdBox, sadly, has a bad reputation here because of the one CB app we have. It’s well written, and the issue is the other developers here are absolutely clueless about it and it gets the blame for everything. Sigh. It was written by a contractor a few years ago who is no longer here.
You can do whatever makes sense to you. I don’t think it makes any sense to share an actual instance of LogBox in memory-- each app can have it’s own LogBox instantiation assuming that they all live in their own application scope. Where the table lives is entirely up to you. The appender is simply doing an insert statement, so it doesn’t care one bit. You do whatever makes sense.
ColdBox, sadly, has a bad reputation here because of the one CB app we have.
I’m very sorry to hear that. Is there anything we can do to help you guys. Ortus provides professional services so let us know if we can be of assistance reviewing your existing app or training developers.
Unfortunately, no. They’ve already decided to abandon ColdFusion for .NET. That will still likely take 3-5 years, but for now they’re doing no new ColdFusion development, and only doing maintenance updates. I’ve been trying to talk them out of it, but you know how that goes… won’t accomplish anything.
So… where does this DBppender config file live? I was looking at the default appenders and none of them are set to autocreate “true” so I’m not sure what’s setting it. It looks like they’re taking input from somewhere, but I’m not sure where.
If I make a custom appender, where does it need to live?
If you’re using LogBox inside of ColdBox, you can create the config file in `/config/LogBox.cfc, or create the “logbox” struct in your /config/ColdBox.cfc.
However, if you’re using LogBox standalone, then you create the LogBox.cfc file wherever you want and pass it in when you create LogBox (probably onApplicationStart())
You should have a read through our docs-- it’s all in there