Results 1 to 2 of 2

Thread: Trace Configuration

  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Default Trace Configuration

    Hello,

    If I have the following in my server.config, I do not get any debug from the Bar class appended to the application specific trace log.:

    Code:
    "trace": {
        "directory": "serviceability/trace",
        "levels": {
            "*" : "info",
            "com.foo.Bar" : "debug"
        }
    }
    However, if I add the wildcard as show below, the debug is appended as expected:

    Code:
    "trace": {
        "directory": "serviceability/trace",
        "levels": {
            "*" : "info",
            "com.foo.Bar.*" : "debug"
        }
    }
    I think the issue is in the area of the StandardEntryFilter.filter(Entry entry) method. Here the log filtering is not done by classname (ie com.foo.Bar), but by the 'source' of the log entry, a value constructed by the TraceEntry class:

    'source'=The classname, appended with the method that triggered the trace, appended with the line number that trace was triggered at.

    For me, this equates to "com.foo.Bar.unknown". (Not sure why I get 'unknown' as the method name, and no line number).

    The result is that the value "com.foo.Bar", specified in the server.config, does not match "com.foo.Bar.unknown", and the debug information is not logged.

    Please advise if this is expected behaviour? If not, I would be happy to log a bug.

    Thanks,
    Tom

  2. #2
    Join Date
    Nov 2008
    Posts
    3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •