• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home
  • Public Forums
  • Application Monitoring & UEM
  • AppMon & UEM Open Q&A
avatar image
Question by Dwayne F. · Aug 14, 2015 at 08:30 PM · configuration sensor

log4j Messages not showing the message, only showing object reference

Hi,

I have the Java logging sensor enabled and am able to see entries in the logging dashlet as well as the purepaths, however the Message field does not tell me anything about the error, only specifying the logging class (for example, util.logging.Log$LoggingParameters@3d54af1b).

I'm not able to make any change to the logging sensor configuration, is there somewhere else (within dynatrace or the application/log4j) where this needs to be configured?

Thanks,

Dwayne

Comment

People who like this

0 Show 2
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Rick B. · Aug 14, 2015 at 11:07 PM 0
Share

Do you have any custom sensors defined which instrument these methods outside the scope of the logging sensor itself?

avatar image Dwayne F. Rick B. · Aug 19, 2015 at 03:47 AM 0
Share

No, there are no custom sensors that instrument these methods.

3 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Christian S. · Aug 19, 2015 at 08:22 AM

hi Dwayne,

it's exactly as I previously assumed: you're using ca.tdbank.util.logging.TDLog$LoggingParameters objects for your log4j logging. the logging sensor will not be able to render them as it only calls toString() on those objects.

so if you implement a toString() method on those objects with the information you want to see, you will be fine.

if that's not possible you could place a custom sensor on this method:

forcedLog(java.lang.String fqcn, org.apache.log4j.Priority level, java.lang.Object message, java.lang.Throwable t)

... then capture the message object and call an accessor method (for more information see here: https://community.dynatrace.com/community/display... on this object. however, that assumes that there is already a method in the ca.tdbank.util.logging.TDLog$LoggingParameters class that gives you the information you need.

and also this approach has the drawback, that you want have this information in the logging dashlet, but just in the PurePath dashlet.

HTH, Christian

Comment
Rajesh S.

People who like this

1 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Dwayne F. · Aug 19, 2015 at 04:26 AM

Hi Christian

I've attached a purepath that contains the issue, I've also attached a screenshot showing what's being captured in the Logging dashlet.

-Dwayne


logging.png (127.7 KiB)
pat-td-oso.dts (1.5 MiB)
Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Christian S. · Aug 17, 2015 at 03:37 PM

hi Dwayne,

do you have a PurePath to share with us?

right now I only have an assumption: I guess you're not using plain strings when logging to log4j, but specific objects, that you implemented on your own (e.g. util.logging.Log$LoggingParameters). based on a short research I figured that you can provide Renderers to log4j to correctly render such log objects.

however, our logging sensor only calls toString() on such log objects and does not use such Renderers.

so one simple approach would be that you add a toString() method to your log objects (assumingly util.logging.Log$LoggingParameters).

HTH, Christian

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Custom messaging tagging

Execution Path not instrumented - Asynchronous Path (JMS)

Sharepoint reporting services?

Monitoring TIBCO processes parameter values

Auto Recommendations of Sensors Selection for Each Technology

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A