Logbox, I just don't understand it.

Here's my config:

logBox = {
  appenders = {
    coldboxTracer =
{ class="coldbox.system.logging.appenders.ColdboxTracerAppender" },
    coldboxFile = {
      class="coldbox.system.logging.appenders.AsyncRollingFileAppender",
      properties={filePath="logs",
      fileName=coldbox.appname,
      autoExpand=true,
      fileMaxSize=2000,
      fileMaxArchives=2}
    }
  },
  root = {levelMin="FATAL", levelMax="INFO", appenders="coldboxFile"},
  catagories = {
    "ws" = {levelMin="FATAL", levelMax="DEBUG",
appenders="coldboxTracer"}
  },
  debug = ["events.general"]
};

I have read the wiki docs till I'm blue in the face and it still
doesn't do what I expect. From my config above I was assuming that I
could use in a handler something like:
logbox.getLogger("ws").debug("My debug message.");
it would use the coldboxTracer appender, doing a trace, but it
doesn't. What's with that?

And if I use (in events.general handler):
logbox.getLogger(this).debug("My debug message.");
it does a trace, though I thought I hadn't told logbox what to do.

I don't know, I'm really feed up with this, the only thing that works
is root. The documentation doesn't make any sense how to use logbox in
a handler or anything. No clear examples. Can anybody explain this
logbox stuff more straight forward?

Thanks

Here's another example:

In my Coldbox.cfc config:
logBox = {
  appenders = {
    coldboxTracer =
{ class="coldbox.system.logging.appenders.ColdboxTracerAppender" },
    coldboxFile = {
      class="coldbox.system.logging.appenders.AsyncRollingFileAppender",
      properties={filePath="logs",
      fileName=coldbox.appname,
      autoExpand=true,
      fileMaxSize=2000,
      fileMaxArchives=2}
    }
  },
  root = {levelMin="FATAL", levelMax="DEBUG", appenders="*"},
  catagories = {
    "ct" = {levelMin="FATAL", levelMax="DEBUG",
appenders="coldboxTracer"},
    "cf" = {levelMin="FATAL", levelMax="DEBUG", appenders="coldboxFile"}
  }
};

I assume that I can use this in a handler:
logbox.getLogger("ct").info("trace this"); //should do the trace
appender only, for info()
logbox.getLogger("cf").error("log this"); //should do the file
appender only, for error()
But running this does a trace on both and a file appender on both.

Since you also have both appenders assigned to the root logger, can you check the log file and see if the name of the logger being used is being put in there to help confirm if your named "category" loggers are working, or if the root logger is what is being fired, or both?

Thanks!

~Brad

And if I use (in events.general handler):
logbox.getLogger(this).debug("My debug message.");
it does a trace, though I thought I hadn't told logbox what to do.

Quick note on this: doing getLogger(this) will match logger categories whose name matches the full dot-delimited CFC path of this. (or a "child" in the folder structure such as "events.general.specific") If events.general is your ColdBox event name, that won't work, but if "this" is a component called "general.cfc" in a directory called "events" in your web root, then it should match. All getLogger does is call getMetaData(this).name I believe so you should be able to dump that out to confirm what "this" is going to get translated into.

Sorry, to not address your other questions, but I don't have time right now to toss your config in and play with it :frowning:

Thanks!

~Brad