Hi All,

 

Can anyone give me a hand with java.util.logging please?

My program spawns Threads that communicate with modems on separate ports.

I would like to create a Logger for each modem.

I’m trying to create the log file in my logs directory straight off user.dir like this:

FileHandler fh = new FileHandler(System.getProperty("user.dir")+"\\logs\\"+key+".log");

 

But I get this Exception when I run my program:

 

java.io.FileNotFoundException: C:\Projects\Voicemail\logs\COM1.log (Access is denied)

        at java.io.FileOutputStream.open(Native Method)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)

        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)

        at java.util.logging.FileHandler.open(FileHandler.java:156)

        at java.util.logging.FileHandler.rotate(FileHandler.java:535)

        at java.util.logging.FileHandler.openFiles(FileHandler.java:423)

        at java.util.logging.FileHandler.<init>(FileHandler.java:237)

        at com.saicom.voicemail.App.<init>(App.java:113)

        at com.saicom.voicemail.App.main(App.java:146)

 

Very annoying…

 

Enrico Goosen

Software Developer

SAICOM TECHNOLOGY

TEL:       +2721 555 0726

FAX:     +2721 555 0821

CEL:     +2783 305 5676

EMAIL: [EMAIL PROTECTED]

 

Reply via email to