WIrebox & Logbox

Hi Guys, working on a logging solution with Wirebox and Logbox. Does anyone have some code of how you setup Logbox inside of Wirebox? Does the Logbox setup go inside the Wirebox configure method?
I would like to use the dbappender and the Fileappender. I was looking at what Andrew Scott did on his site with AOP method logging of incoming arguments and returned results… I was able to get this working but I am not sure how I might set it up with the dbappender and Fileappender. Any help would be appreciated.

mapAspect(“LoggerAspect”).to(“wirebox.system.aop.aspects.MethodLogger”).initArg(name=“logResults”, value=“true”);
bindAspect(classes=match().any(), methods=match().annotatedWith(“logger”), aspects=“LoggerAspect”);

Thanks,

George Murphy

George

​Wirebox config has a logbox config setting. Jut point it to a logbox config cfc. In there you just add normal logbox configuration.

Hi Luis, I have been looking for some sample code for that setting of logbox inside wirebox…Can you please post a sample?

Thanks,

George Murphy

George, there is no difference.

Wirebox has the logbox config setting that should point to the CFC.

logBoxConfig = “my.path.LogBox”

Then in the LogBox config, you put the normal configurations found here: http://wiki.coldbox.org/wiki/LogBox.cfm#Configuring_LogBox

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Hi Luis, would I add what you are suggesting like this in the Wirebox binder?

wireBox = {

logboxConfig = “wirebox.system.logging.Logbox”;

}

Here is what I have.

In Wirebox.cfc (Binder I did this)

map(“Config”).to(“wirebox.system.logging.config.LogBoxConfig”).initArg(CFCConfigPath=“logboxConfig”);
map(“logbox”).to(“wirebox.system.logging.Logbox”).initArg(config=“Config”, rel=“Config”);

I don’t think I need to do this.

In my Configuration component logboxConfig.cfc I did this.

logBox = {

appenders = {
myPDLogDB = {
class=“wirebox.system.logging.appenders.DBAppender”,
properties={
dsn=“QQQ”,
table=“QQQlog”,
autocreate=true
},
levelMin=“FATAL”,
levelMax=“WARN”
},
myMatLogFile = {
class=“wirebox.system.logging.appenders.AsyncRollingFileAppender”,
properties={
filePath=“C:\ColdFusion9\logs”,
fileMaxSize=“5”,
fileMaxArchives=2
}
}
},

root = {levelMin=“FATAL”, levelMax=“INFO”, appenders="*"}
};

I am confused about how to call this. No Database table was created from this method nor was any log file created.
This is how I tried to call it. I want them both to fire. How do I call them? Do I need to create a category for them in the logboxConfig.cfc?

Hi Guys, I have not been able to get the appenders working from inside wirebox. I moved the creation of logbox to an onApplicationStart and it kicked in right away.

var lbConfig = new wirebox.system.logging.config.LogBoxConfig().init(CFCConfigPath=“util.logboxConfig”);
application.logbox = new wirebox.system.logging.LogBox().init(lbConfig);

The dbappender did not fire because of an error. The database is Oracle 10g.

Here is the error. [Macromedia][Oracle JDBC Driver][Oracle]ORA-00902: invalid datatype
wirebox\system\logging\appenders\DBAppender.cfc: line 169

Thanks

George