You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Steve Simons <mr...@hotmail.com> on 2001/09/19 12:34:33 UTC
Log4j in an applet
Hi,
I'm have a problem when using Log4j to log from my applet. When running the
applet with an unrestricted security access (i.e. the policy file grants all
access to all folders), there is no problem. However, when using a policy
file that restricts access to the directory in which the applet and log4j
jar files are located, and the directory in which the ouput log file should
be sent, I get the following error:
java.lang.ExceptionInInitializerError: java.security.AccessControlException:
access denied (java.io.FilePermission /logfile.log write)
The .java.policy file that I am using contains the following entries:
grant codeBase "file:C:/appletjardir/*" {
permission java.io.FilePermission "C:\\appletjardir", "read, write, delete";
permission java.io.FilePermission "C:\\appletjardir\\-", "read, write,
delete";
permission java.security.SecurityPermission "getPolicy";
permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "createClassLoader";
permission java.io.FilePermission "C:\\Temp", "read, write, delete";
permission java.io.FilePermission "C:\\Temp\\-", "read, write, delete";
};
Can someone explain why? I do not know alot about policy files so any help
would be gratefully received.
Best Regards
SS
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Reading priority of the log
Posted by Carlos Costa Portela <cc...@genasys.es>.
Hello all!
I'm using SocketAppender, and I need know the Priority of the log
message. How can I achieve this?. I've find the readPriority() method, but
this method doesn't return value.
Thanks in advance,
Carlos.
--
_________ Carlos Costa Portela ____________ ccosta@genasys.es _____
| http://ccp.servidores.net http://www.genasys.es |
|_Tódalas persoas maiores foron nenos antes, pero poucas se lembran_|
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org