v201109 ReportDefinition log4j Categories

71 views
Skip to first unread message

Pete Lavetsky (AdWords API Guru)

unread,
Mar 9, 2012, 11:21:36 AM3/9/12
to adwor...@googlegroups.com
What category do I need to define in log4j in order to have my report definitions logged when downloading reports using ReportUtils ?  I have the following defined and everything else logs correctly:

<category name="com.google.api.adwords.lib.AdWordsUser.soap_xml" additivity="false">
        <level value="DEBUG"/>
        <appender-ref ref="SOAP_XML"/>
    </category>

    <category name="com.google.api.adwords.lib.AdWordsUser.request_info" additivity="false">
        <level value="DEBUG"/>
        <appender-ref ref="REQUEST_INFO"/>
    </category>

    <category name="com.google.api.adwords.lib.AdWordsUser.aw_api_lib" additivity="false">
        <level value="DEBUG"/>
        <appender-ref ref="AW_API_LIB"/>
    </category>

Thanks
Pete

jstedman

unread,
Mar 12, 2012, 12:57:56 PM3/12/12
to adwor...@googlegroups.com
Pete,

I found this log4j.properties file in the adwords-api-8.5.0-loner.tar.gz file in the /adwords-api-8.5.0/ directory. It seems the HTTPSender logging is commented out in the file by default. Enabling it by uncommenting these lines and adding axis logging to your log4j category list might solve your issue.

//log4j.properties excerpt:

#log4j.appender.axisLogFile=org.apache.log4j.FileAppender
#log4j.appender.axisLogFile.File=logs/axis.log
#log4j.appender.axisLogFile.layout=org.apache.log4j.PatternLayout
#log4j.appender.axisLogFile.layout.ConversionPattern=[%d{DATE} - %-5p] %m%n

...

#log4j.logger.org.apache.axis.transport.http.HTTPSender=DEBUG, axisLogFile

Good luck! Hope this helps.

Pete Lavetsky (AdWords API Guru)

unread,
Mar 12, 2012, 1:56:25 PM3/12/12
to adwor...@googlegroups.com
Thanks Jason ... already had that in my logging.xml as well, no luck

Eric Koleda

unread,
Mar 15, 2012, 10:53:06 AM3/15/12
to adwor...@googlegroups.com
Hi All,

Unfortunately the Java client library currently doesn't log report download requests, but it's a feature that the maintainers are thinking about.  If you'd like to implement it and upstream the change I'm sure they would appreciate the help!

Best,
- Eric Koleda, AdWords API Team
Reply all
Reply to author
Forward
0 new messages