How to get better logging out of AUSkey

129 views
Skip to first unread message

Paul Gear

unread,
May 16, 2012, 9:11:20 PM5/16/12
to aus...@googlegroups.com
Here's a patch for log4j.properties that will make it more verbose.  This helps when trying to troubleshoot authentication issues.  This file lives in ~/AUSkey; be sure to change the File to a path that makes sense for your system.

--- log4j.properties.orig    2012-05-17 10:34:13.000000000 +1000
+++ log4j.properties    2012-05-17 10:33:57.000000000 +1000
@@ -1,4 +1,11 @@
-log4j.rootLogger=WARN,CONSOLE
+log4j.rootLogger=DEBUG,R
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=/home/me/AUSkey/debug.log
+log4j.appender.R.MaxFileSize=10MB
+log4j.appender.R.MaxBackupIndex=10
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.appender.R.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
 log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n

Rob Hills

unread,
Feb 27, 2013, 11:36:15 PM2/27/13
to aus...@googlegroups.com
Hi Paul,


On Thursday, May 17, 2012 9:11:20 AM UTC+8, Paul Gear wrote:
Here's a patch for log4j.properties that will make it more verbose.  This helps when trying to troubleshoot authentication issues.  This file lives in ~/AUSkey; be sure to change the File to a path that makes sense for your system.

Thanks for the info on logging, however I've not been able to get this working at all.  I have a lot of experience with Java development and have used Log4J reasonably extensively but this one has me stumped.

I've tried several different locations for the output file (changing the log4j.appender.R.File entry to match each time), checked the permissions on the target directory etc. etc. but I can't get any logging happening.  I'm also having major problems troubleshooting authentication issues so logging output from AusKey would be very useful!

Any chance you could post your actual log4j.properties file (feel free to obfuscate the file output location if necessary) in case I've misread the patch changes.  I applied them manually to my log4j.properties file and maybe that is where the problem lies???

Many thanks,
Rob Hills
Waikiki, WA

Paul Gear

unread,
Feb 28, 2013, 4:57:36 PM2/28/13
to aus...@googlegroups.com
Hi Rob,

It's been a while since i touched this, but below is what i think worked last time.  I've upgraded my laptop and changed from Ubuntu 10.04 to Linux Mint Debian edition, and i've found that AUSkey doesn't work on this configuration, so i end up pulling out my old laptop every time i want to do my BAS.  Hope it helps!

log4j.rootLogger=DEBUG,R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/home/username/AUSkey/debug.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

log4j.appender.R.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

Regards,
Paul

Rob Hills

unread,
Mar 5, 2013, 11:37:05 AM3/5/13
to aus...@googlegroups.com
Hi Paul,


On Friday, 1 March 2013 05:57:36 UTC+8, Paul Gear wrote:
It's been a while since i touched this, but below is what i think worked last time.  I've upgraded my laptop and changed from Ubuntu 10.04 to Linux Mint Debian edition, and i've found that AUSkey doesn't work on this configuration, so i end up pulling out my old laptop every time i want to do my BAS.  Hope it helps!

log4j.rootLogger=DEBUG,R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/home/username/AUSkey/debug.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.R.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

 Thanks for the details, but I'm still not getting any AusKey logging :-(.  I've spent a lot of time on this and worked out how to get the icedtea-web plugin logs on my system (in Ubuntu 12.10/openJava 7u15-2.3.2/IcedTea7 2.3.7), they reside in ~/.icedtea/log as stderr.log and stdout.log.

If I try and access the ATO Business Portal login page (which is still not working on my setup-) the icedtea "java.stderr" log includes the following lines:
log4j:WARN No appenders could be found for logger (au.gov.abr.auth.browserenabler.operationstatemanager.OperationStateManager).
log4j:WARN Please initialize the log4j system properly.

Googling this error message suggests that log4j is not finding its properties file.  I've tried putting it in the ~/AUSkey directory (as suggested) as well as in the /usr/java/packages/lib/ext directory which contains all the AUSkey jars including log4j, but I still get the error message and no logging.

It's going to be very hard to try and get AUSkey working on my system without logging :-(

Cheers,
Rob Hills

Forty Morecambe

unread,
Mar 7, 2013, 6:20:09 AM3/7/13
to aus...@googlegroups.com
I don't recommend using iced tea. Tt is not production ready. Use oracle's plugin instead and then it'll work and you don't need logs.
 

I would regard attempts to get it working as - a bit overly optimistic (having spent several days looking at IcedTea), especially considering it is now VERY easy to install the Oracle plugins.
 

Here it the very simple approach I have tested.
 

http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

Paul Gear

unread,
Mar 7, 2013, 2:17:16 PM3/7/13
to aus...@googlegroups.com
I must admit i didn't try it with Java 7 or IcedTea - every working
config i've used was with Oracle's Java 6.

Paul
Reply all
Reply to author
Forward
0 new messages