users@glassfish.java.net

Re: ACC logging

From: <glassfish_at_javadesktop.org>
Date: Tue, 02 Dec 2008 11:55:51 PST

Is there documentation for ACC (Application Client Container/ Java Web Start) logging that might be available? Or someone that could provide a very simple example? How does one receive logging from the client side and store it on the server so that we may make sure that applications are running correctly?

For example:

Edit sun-acc.xml
After <client-container> add:
<log-service file="client.log" level="FINEST"/>

Main.java
package com.testing.main;

import javax.swing.*;

import java.awt.*;
import java.util.logging.*;

public class Main
{
        private String username="";
        private String password="";
        
        private JFrame main = new JFrame();
        private Logger log = Logger.getLogger(Main.class.getName());

        public Main(String username, String password)
        {

                this.username=username;
                this.password=username;
                                
                // Create the GUI for the Serenity application
                JPanel panel = createMenu();
                
                main.getContentPane().add(panel);
                main.setSize(new Dimension(800,600));
                main.setVisible(true);
        }
        
        private JPanel createMenu()
        {
                JMenuBar menuBar=null;
                JMenu menu=null;
                
                log.info("Testing the logger");
                
                JPanel panel = new JPanel();
                JLabel label = new JLabel("Testing this - "+Main.class.getName());
                panel.add(label);
                
                return panel;
        }

        
        public static void main(String[] args)
        {
                
                if (args.length==2)
                {
                        String username=args[0];
                        String password=args[1];
                        new Main(username, password);
                }
                else
                {
                        new Main("","");
                }
                
                
        }
}

Goto Admin Console -> Application Server -> Logging ->Log Levels -> Add Property (Name: com.test.main.Main, Value: FINEST)

Goto Glassfish Direc/domain/domain1/logs -> look at client.log
ETC.

Of course doing all of these things yields no fruit, but perhaps someone knowledgeable would be able to educate the rest of us. Thank you to anyone that may shed light on this troublesome problem.
[Message sent by forum member 'enderfake' (enderfake)]

http://forums.java.net/jive/thread.jspa?messageID=319631