Select to view content in your preferred language

Understanding Logging

3635
2
Jump to solution
06-11-2015 07:15 AM
BryanBoutz1
Occasional Contributor

I'm struggling through learning GeoEvent Processor both configuration of out-of-the-box components as well as developing custom components.  I'm finding my biggest struggle is not knowing what is actually happening when stuff doesn't work.  For example, I pass a buffer using a custom transport to the text adaptor and nothing happens.  I can see through the debugger and my own custom logger debug calls that byteListener.receive(byteBuffer, channelId); was called, but then nothing happens after that with the stream. I imagine I'm not meeting some requirement of the data, but I'm pulling out what little hair I have left because I have no way to know why it just didn't do anything.

In logs I can't see the text adaptor component to turn up logging.  Earlier I tried just using the file transport and while I could make it work, I couldn't find any way to get useful information from the logs such as what files were processed, etc.  That seems like really useful log information if a person was tracing back a problem, so I assume I'm just not doing something correctly.

My question is, are there any tricks to using the logging system to troubleshoot or track inputs?

0 Kudos
1 Solution

Accepted Solutions
MingZhao
Occasional Contributor

Bryan,

If the text adapter receives the byte buffer but cannot parse it, it should throw an exception which show up in the logger.  If it doesn't in your case, that means we didn't handle that particular error correctly.   In terms of turning on DEBUG, you can turn on DEBUG for individual components.  If you don't know which component to turn on, you may be able to turn on DEBUG for root for a short while.  This will put a lot of messages in the logger.  But you should only have it on DEBUG for a short time.  You should be able to see additional information from the logs.

In your situation, the components you want to turn on DEBUG for are:

com.esri.ges.adapter.text.TextInboundAdapter and com.esri.ges.transport.file.FileInboundTransport

Hope it helps.

Thanks,

Ming Zhao

View solution in original post

0 Kudos
2 Replies
BryanBoutz1
Occasional Contributor

I eventually found there was a problem with the way I was encoding text sent into the byteListenter in my custom transport, so at least I'm moving forward.

I still don't see any way to extract useful troubleshooting information from FileInboundTransport and Text adapter.  Through console logging I can set com.esri.ges.transport.file.FileInboundTransport: DEBUG, but I don't see anything getting logged. I haven't figured out what to look at for text Adapter logging. 

At this point it seems there isn't much logging provided on those components.  I guess I will have to wrap custom components around the out-of-the-box components if I want additional logging.

0 Kudos
MingZhao
Occasional Contributor

Bryan,

If the text adapter receives the byte buffer but cannot parse it, it should throw an exception which show up in the logger.  If it doesn't in your case, that means we didn't handle that particular error correctly.   In terms of turning on DEBUG, you can turn on DEBUG for individual components.  If you don't know which component to turn on, you may be able to turn on DEBUG for root for a short while.  This will put a lot of messages in the logger.  But you should only have it on DEBUG for a short time.  You should be able to see additional information from the logs.

In your situation, the components you want to turn on DEBUG for are:

com.esri.ges.adapter.text.TextInboundAdapter and com.esri.ges.transport.file.FileInboundTransport

Hope it helps.

Thanks,

Ming Zhao

0 Kudos