begin process at 2010 02 10 08:12:49
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Systeme

 > VISUALISER DES JOURNAUX LOG4J

VISUALISER DES JOURNAUX LOG4J


 Information sur la source

Note :
Aucune note
Catégorie :Systeme Classé sous :log4j, journal, log Niveau :Initié Date de création :10/02/2008 Vu :5 219

Auteur : twinser

Ecrire un message privé
Commentaire sur cette source (4)
Ajouter un commentaire et/ou une note

 Description

Cliquez pour voir la capture en taille normale
Cette JInternalFrame permet de visualiser les journaux et permet d'appliquer des filtres de type [erreur][info][debug].
Le code source initial provient du projet SQuireL. Principale modification : la console est réactualisé toutes les secondes.
Impératif : dans votre log, il faut que le appender est en paramètre [%t] pour permettre la reconnaissance du type d'erreur. Par exemple pour moi j'ai quelque chose comme :
log4j.appender.A1.layout.ConversionPattern=%d{dd .MM.yyyy HH:mm:ss} [%t] %-5p %c %x - %m%n

Source

  • /*
  • * Copyright (C) 2002-2006 Colin Bell
  • * colbell@users.sourceforge.net
  • *
  • * This library is free software; you can redistribute it and/or
  • * modify it under the terms of the GNU Lesser General Public
  • * License as published by the Free Software Foundation; either
  • * version 2.1 of the License, or (at your option) any later version.
  • *
  • * This library is distributed in the hope that it will be useful,
  • * but WITHOUT ANY WARRANTY; without even the implied warranty of
  • * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  • * Lesser General Public License for more details.
  • *
  • * You should have received a copy of the GNU Lesser General Public
  • * License along with this library; if not, write to the Free Software
  • * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  • */
  • import java.awt.BorderLayout;
  • import java.awt.Container;
  • import java.awt.Cursor;
  • import java.awt.event.*;
  • import java.io.BufferedReader;
  • import java.io.File;
  • import java.io.FileReader;
  • import java.lang.reflect.InvocationTargetException;
  • import javax.swing.*;
  • import org.apache.log4j.Logger;
  • /**
  • * This sheet shows the SQuirreL log files.
  • *
  • * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
  • * Ce n'est pas la version original..
  • */
  • public class ViewLogsSheet extends JInternalFrame {
  • /** Logger for this class. */
  • private static Logger _log = Logger.getLogger(ViewLogsSheet.class);
  • /** Combo box containing all the log files. */
  • /** Text area containing the log contents. */
  • private final JTextArea _logContentsTxt = new JTextArea(20, 50);
  • /** Button that refreshes the log contents. */
  • private final JButton _refreshBtn = new JButton("Rafraichir");
  • private final JCheckBox _errorChkbox = new JCheckBox("Errors");
  • private final JCheckBox _debugChkbox = new JCheckBox("Debug");
  • private final JCheckBox _infoChkbox = new JCheckBox("Info");
  • /** Directory containing the log files. */
  • private final File _logDir;
  • /** If <TT>true</TT> user is closing this window. */
  • private boolean _closing = false;
  • /** If <TT>true</TT> log is being refreshed. */
  • private boolean _refreshing = false;
  • /** Size of current log file */
  • private long _fileLenght;
  • private static final long serialVersionUID = 1L;
  • /**
  • *
  • *
  • * @throws IllegalArgumentException
  • * Thrown if a <TT>null</TT> <TT>IApplication passed.
  • */
  • public ViewLogsSheet() {
  • super("Journaux", true, true, true, true);
  • _logDir = new File("opc-client.log"); //!!! mettez ici votre fichier
  • _fileLenght = _logDir.length();
  • createUserInterface();
  • startRefreshingLog();
  • new Thread(new LenghtDetect()).start();
  • }
  • @Override
  • public void dispose() {
  • // Stop refresh if it is running.
  • _closing = true;
  • super.dispose();
  • }
  • /**
  • * Close this sheet.
  • */
  • private void performClose() {
  • dispose();
  • }
  • /**
  • * Start a thread to refrsh the log.
  • */
  • private synchronized void startRefreshingLog() {
  • if (!_refreshing) {
  • new Thread(new Refresher()).run();
  • }
  • // refreshLog();
  • }
  • /**
  • * Enables the log combo box and refresh button using the Swing event
  • * thread.
  • */
  • private void enableComponents(final boolean enabled) {
  • Runnable todo = new Runnable() {
  • public void run() {
  • _refreshBtn.setEnabled(enabled);
  • }
  • };
  • if (SwingUtilities.isEventDispatchThread()) {
  • todo.run();
  • } else {
  • try {
  • SwingUtilities.invokeAndWait(todo);
  • } catch (InterruptedException ex) {
  • _log.error(ex);
  • } catch (InvocationTargetException ex) {
  • _log.error(ex);
  • }
  • }
  • }
  • /**
  • * Refresh the log.
  • */
  • private void refreshLog() {
  • enableComponents(false);
  • setCursor(new Cursor(Cursor.WAIT_CURSOR));
  • try {
  • _logContentsTxt.setText("");
  • final File logFile = _logDir;
  • if (logFile != null) {
  • try {
  • if (logFile.exists() && logFile.canRead()) {
  • final BufferedReader rdr = new BufferedReader(new FileReader(logFile));
  • try {
  • String line = null;
  • StringBuffer chunk = new StringBuffer(16384);
  • while ((line = rdr.readLine()) != null) {
  • if (_closing) {
  • return;
  • }
  • if (chunk.length() > 16000) {
  • final String finalLine = chunk.toString();
  • if (!_closing) {
  • _logContentsTxt.append(finalLine);
  • }
  • chunk = new StringBuffer(16384);
  • } else {
  • if (shouldAppendLineToChunk(line)) {
  • chunk.append(line).append('\n');
  • }
  • }
  • }
  • if (_closing) {
  • return;
  • }
  • final String finalLine = chunk.toString();
  • if (!_closing) {
  • _logContentsTxt.append(finalLine);
  • }
  • } finally {
  • rdr.close();
  • }
  • }
  • } catch (Exception ex) {
  • // i18n[ViewLogsSheet.error.processinglogfile=Error occured processing log file]
  • final String msg = "ViewLogsSheet.error.processinglogfile";
  • _log.error(msg, ex);
  • }
  • } else {
  • // i18n[ViewLogsSheet.info.nulllogfile=Null log file name]
  • _log.debug("ViewLogsSheet.info.nulllogfile");
  • }
  • if (_closing) {
  • return;
  • }
  • // Position to the start of the last line in log.
  • try {
  • int pos = Math.max(0, _logContentsTxt.getText().length() - 1);
  • int line = _logContentsTxt.getLineOfOffset(pos);
  • final int finalpos = _logContentsTxt.getLineStartOffset(line);
  • _logContentsTxt.setCaretPosition(finalpos);
  • } catch (Exception ex) {
  • // i18n[ViewLogsSheet.error.setcaret=Error positioning caret in log text component]
  • _log.error("ViewLogsSheet.error.setcaret", ex);
  • }
  • } finally {
  • enableComponents(true);
  • _refreshing = false;
  • setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
  • }
  • }
  • /**
  • 199828 [Foo Thread] message
  • * @param line
  • * @return
  • */
  • private boolean shouldAppendLineToChunk(String line) {
  • boolean result = false;
  • if (line == null || line.length() == 0) {
  • return false;
  • }
  • if (_errorChkbox.isSelected() && _debugChkbox.isSelected() && _infoChkbox.isSelected()) {
  • return true;
  • }
  • int threadNameEndIdx = line.indexOf("]");
  • if (threadNameEndIdx > -1) {
  • if (threadNameEndIdx + 2 >= line.length()) {
  • return false;
  • } //Garde de fou
  • char levelChar = line.charAt(threadNameEndIdx + 2);
  • if (_errorChkbox.isSelected() && levelChar == 'E') {
  • result = true;
  • }
  • if (_debugChkbox.isSelected() && levelChar == 'D') {
  • result = true;
  • }
  • if (_infoChkbox.isSelected() && levelChar == 'I') {
  • result = true;
  • }
  • if (levelChar != 'E' && levelChar != 'D' && levelChar != 'I') {
  • result = true;
  • }
  • } else {
  • result = true;
  • }
  • return result;
  • }
  • /**
  • * Create user interface.
  • */
  • private void createUserInterface() {
  • setDefaultCloseOperation(DISPOSE_ON_CLOSE);
  • // putClientProperty("JInternalFrame.isPalette", true);
  • Container contentPane = getContentPane();
  • contentPane.setLayout(new BorderLayout());
  • // contentPane.add(createToolBar(), BorderLayout.NORTH);
  • contentPane.add(createMainPanel(), BorderLayout.CENTER);
  • contentPane.add(createButtonsPanel(), BorderLayout.SOUTH);
  • pack();
  • AbstractAction closeAction = new AbstractActionImpl();
  • KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
  • getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeStroke, "CloseAction");
  • getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeStroke, "CloseAction");
  • getRootPane().getInputMap(JComponent.WHEN_FOCUSED).put(escapeStroke, "CloseAction");
  • getRootPane().getActionMap().put("CloseAction", closeAction);
  • }
  • /**
  • * Create the main panel containing the log details and selector.
  • */
  • private JPanel createMainPanel() {
  • // File appLogFile = new ApplicationFiles().getExecutionLogFile();
  • final JPanel pnl = new JPanel(new BorderLayout());
  • _logContentsTxt.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0));
  • pnl.add(new JScrollPane(_logContentsTxt), BorderLayout.CENTER);
  • return pnl;
  • }
  • /**
  • * Create panel at bottom containing the buttons.
  • */
  • private JPanel createButtonsPanel() {
  • JPanel pnl = new JPanel();
  • pnl.add(_refreshBtn);
  • _refreshBtn.addActionListener(new ActionListener() {
  • public void actionPerformed(ActionEvent evt) {
  • startRefreshingLog();
  • }
  • });
  • JButton closeBtn = new JButton("Fermer");
  • closeBtn.addActionListener(new ActionListener() {
  • public void actionPerformed(ActionEvent evt) {
  • performClose();
  • }
  • });
  • pnl.add(closeBtn);
  • _errorChkbox.setSelected(true);
  • _debugChkbox.setSelected(true);
  • _infoChkbox.setSelected(true);
  • ActionListener changeLogListener= new ChangeLogListener();
  • _errorChkbox.addActionListener(changeLogListener);
  • _debugChkbox.addActionListener(changeLogListener);
  • _infoChkbox.addActionListener(changeLogListener);
  • pnl.add(_errorChkbox);
  • pnl.add(_infoChkbox);
  • pnl.add(_debugChkbox);
  • //GUIUtilities.setJButtonSizesTheSame(new JButton[]{closeBtn, _refreshBtn});
  • getRootPane().setDefaultButton(closeBtn);
  • return pnl;
  • }
  • private final class ChangeLogListener implements ActionListener {
  • public void actionPerformed(ActionEvent evt) {
  • ViewLogsSheet.this.startRefreshingLog();
  • }
  • }
  • private final class Refresher implements Runnable {
  • public void run() {
  • // ViewLogsSheet.this.
  • refreshLog();
  • }
  • }
  • private class LenghtDetect implements Runnable {
  • public void run() {
  • while (!_closing) {
  • try {
  • Thread.sleep(1000);
  • if(_fileLenght<_logDir.length()){
  • if(!_refreshing)refreshLog(); //doit être exécuter sur le même thread
  • _fileLenght = _logDir.length();
  • }
  • } catch (InterruptedException ex) {
  • _log.error("Erreur Thread lecture console",ex);
  • }
  • }
  • }
  • }
  • private class AbstractActionImpl extends AbstractAction {
  • private static final long serialVersionUID = 1L;
  • public AbstractActionImpl() {
  • }
  • public void actionPerformed(ActionEvent actionEvent) {
  • performClose();
  • }
  • }
  • }
/*
 * Copyright (C) 2002-2006 Colin Bell
 * colbell@users.sourceforge.net
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.event.*;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.lang.reflect.InvocationTargetException;
import javax.swing.*;
import org.apache.log4j.Logger;

/**
 * This sheet shows the SQuirreL log files.
 *
 * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
 * Ce n'est pas la version original..
 */
public class ViewLogsSheet extends JInternalFrame {

    /** Logger for this class. */
    private static Logger _log = Logger.getLogger(ViewLogsSheet.class);
    /** Combo box containing all the log files. */
    /** Text area containing the log contents. */
    private final JTextArea _logContentsTxt = new JTextArea(20, 50);
    /** Button that refreshes the log contents. */
    private final JButton _refreshBtn = new JButton("Rafraichir");
    private final JCheckBox _errorChkbox = new JCheckBox("Errors");
    private final JCheckBox _debugChkbox = new JCheckBox("Debug");
    private final JCheckBox _infoChkbox = new JCheckBox("Info");
    /** Directory containing the log files. */
    private final File _logDir;
    /** If <TT>true</TT> user is closing this window. */
    private boolean _closing = false;
    /** If <TT>true</TT> log is being refreshed. */
    private boolean _refreshing = false;
    /** Size of current log file */
    private long _fileLenght;
    private static final long serialVersionUID = 1L;
    /**
     * 
     *
     * @throws	IllegalArgumentException
     *			Thrown if a <TT>null</TT> <TT>IApplication passed.
     */
    public ViewLogsSheet() {
        super("Journaux", true, true, true, true);
        _logDir = new File("opc-client.log"); //!!! mettez ici votre fichier
        _fileLenght = _logDir.length();

        createUserInterface();
        startRefreshingLog();
        new Thread(new LenghtDetect()).start();
    }

    @Override
    public void dispose() {
        // Stop refresh if it is running.
        _closing = true;
        super.dispose();
    }

    /**
     * Close this sheet.
     */
    private void performClose() {
        dispose();
    }

    /**
     * Start a thread to refrsh the log.
     */
    private synchronized void startRefreshingLog() {
        if (!_refreshing) {

            new Thread(new Refresher()).run();

        }
    // refreshLog();
    }

    /**
     * Enables the log combo box and refresh button using the Swing event 
     * thread.
     */
    private void enableComponents(final boolean enabled) {
        Runnable todo = new Runnable() {

            public void run() {
                _refreshBtn.setEnabled(enabled);
            }
        };
        if (SwingUtilities.isEventDispatchThread()) {
            todo.run();
        } else {
            try {
                SwingUtilities.invokeAndWait(todo);
            } catch (InterruptedException ex) {
                _log.error(ex);
            } catch (InvocationTargetException ex) {
                _log.error(ex);
            }
        }
    }

    /**
     * Refresh the log.
     */
    private void refreshLog() {
        enableComponents(false);
        setCursor(new Cursor(Cursor.WAIT_CURSOR));
        try {
            _logContentsTxt.setText("");

            final File logFile =  _logDir;
            if (logFile != null) {
                try {
                    if (logFile.exists() && logFile.canRead()) {
                        final BufferedReader rdr = new BufferedReader(new FileReader(logFile));
                        try {
                            String line = null;
                            StringBuffer chunk = new StringBuffer(16384);
                            while ((line = rdr.readLine()) != null) {
                                if (_closing) {
                                    return;
                                }

                                if (chunk.length() > 16000) {
                                    final String finalLine = chunk.toString();

                                    if (!_closing) {
                                        _logContentsTxt.append(finalLine);
                                    }

                                    chunk = new StringBuffer(16384);
                                } else {
                                    if (shouldAppendLineToChunk(line)) {
                                        chunk.append(line).append('\n');
                                    }
                                }
                            }

                            if (_closing) {
                                return;
                            }

                            final String finalLine = chunk.toString();
                            if (!_closing) {
                                _logContentsTxt.append(finalLine);
                            }

                        } finally {
                            rdr.close();
                        }
                    }
                } catch (Exception ex) {
                    // i18n[ViewLogsSheet.error.processinglogfile=Error occured processing log file]
                    final String msg = "ViewLogsSheet.error.processinglogfile";
                    _log.error(msg, ex);
                }
            } else {
                // i18n[ViewLogsSheet.info.nulllogfile=Null log file name]
                _log.debug("ViewLogsSheet.info.nulllogfile");
            }

            if (_closing) {
                return;
            }

            // Position to the start of the last line in log.
            try {
                int pos = Math.max(0, _logContentsTxt.getText().length() - 1);
                int line = _logContentsTxt.getLineOfOffset(pos);
                final int finalpos = _logContentsTxt.getLineStartOffset(line);
                _logContentsTxt.setCaretPosition(finalpos);

            } catch (Exception ex) {
                // i18n[ViewLogsSheet.error.setcaret=Error positioning caret in log text component]
                _log.error("ViewLogsSheet.error.setcaret", ex);
            }
        } finally {
            enableComponents(true);
            _refreshing = false;
            setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        }
    }

    /**
    199828 [Foo Thread] message 
     * @param line
     * @return
     */
    private boolean shouldAppendLineToChunk(String line) {
        boolean result = false;
        if (line == null || line.length() == 0) {
            return false;
        }
        if (_errorChkbox.isSelected() && _debugChkbox.isSelected() && _infoChkbox.isSelected()) {
            return true;
        }
        int threadNameEndIdx = line.indexOf("]");
        if (threadNameEndIdx > -1) {
            if (threadNameEndIdx + 2 >= line.length()) {
                return false;
            } //Garde de fou
            char levelChar = line.charAt(threadNameEndIdx + 2);
            if (_errorChkbox.isSelected() && levelChar == 'E') {
                result = true;
            }
            if (_debugChkbox.isSelected() && levelChar == 'D') {
                result = true;
            }
            if (_infoChkbox.isSelected() && levelChar == 'I') {
                result = true;
            }
            if (levelChar != 'E' && levelChar != 'D' && levelChar != 'I') {
                result = true;
            }
        } else {
            result = true;
        }
        return result;
    }

    /**
     * Create user interface.
     */
    private void createUserInterface() {
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        // putClientProperty("JInternalFrame.isPalette", true);
        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());
        //      contentPane.add(createToolBar(), BorderLayout.NORTH);
        contentPane.add(createMainPanel(), BorderLayout.CENTER);
        contentPane.add(createButtonsPanel(), BorderLayout.SOUTH);
        pack();


        AbstractAction closeAction = new AbstractActionImpl();
        KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
        getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeStroke, "CloseAction");
        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeStroke, "CloseAction");
        getRootPane().getInputMap(JComponent.WHEN_FOCUSED).put(escapeStroke, "CloseAction");
        getRootPane().getActionMap().put("CloseAction", closeAction);

    }


    /**
     * Create the main panel containing the log details and selector.
     */
    private JPanel createMainPanel() {

        //  File appLogFile = new ApplicationFiles().getExecutionLogFile();
        final JPanel pnl = new JPanel(new BorderLayout());
        _logContentsTxt.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0));
        pnl.add(new JScrollPane(_logContentsTxt), BorderLayout.CENTER);

        return pnl;
    }

    /**
     * Create panel at bottom containing the buttons.
     */
    private JPanel createButtonsPanel() {
        JPanel pnl = new JPanel();

        pnl.add(_refreshBtn);
        _refreshBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                startRefreshingLog();
            }
        });

        JButton closeBtn = new JButton("Fermer");
        closeBtn.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent evt) {
                performClose();
            }
        });
        pnl.add(closeBtn);

        _errorChkbox.setSelected(true);

        _debugChkbox.setSelected(true);
        _infoChkbox.setSelected(true);
        ActionListener changeLogListener= new ChangeLogListener();
        _errorChkbox.addActionListener(changeLogListener);
        _debugChkbox.addActionListener(changeLogListener);
        _infoChkbox.addActionListener(changeLogListener);
        pnl.add(_errorChkbox);
        pnl.add(_infoChkbox);
        pnl.add(_debugChkbox);
        //GUIUtilities.setJButtonSizesTheSame(new JButton[]{closeBtn, _refreshBtn});
        getRootPane().setDefaultButton(closeBtn);

        return pnl;
    }

    private final class ChangeLogListener implements ActionListener {
        public void actionPerformed(ActionEvent evt) {
            ViewLogsSheet.this.startRefreshingLog();
        }
    }

    private final class Refresher implements Runnable {

        public void run() {
           // ViewLogsSheet.this.
                    refreshLog();
        }
    }

    private class LenghtDetect implements Runnable {
      
        public void run() {
            while (!_closing) {
                try {
                  Thread.sleep(1000);
                    if(_fileLenght<_logDir.length()){
                       if(!_refreshing)refreshLog(); //doit être exécuter sur le même thread
                       _fileLenght = _logDir.length();
                    }
                } catch (InterruptedException ex) {
                    _log.error("Erreur Thread lecture console",ex);
                }
            }
        }
    }

    private class AbstractActionImpl extends AbstractAction {
        private static final long serialVersionUID = 1L;
        public AbstractActionImpl() {
        }

        public void actionPerformed(ActionEvent actionEvent) {
            performClose();
        }
    }
}

 Conclusion

J'avais proposé il y a quelque temps une technique pour redirigé la console, mais c'est un procédé lourd. Celle-ci me semble plus sympa.
Si il y a un bug dans le code, je vous souhaite bonne chance ca je n'ai pas laissé tellement de commentaires.


 Sources du même auteur

Source avec Zip Source avec une capture APPLET : REDIMENSIONNEMENT D'UNE IMAGE AVANT UPLOAD
Source avec Zip Source avec une capture FEUILLE DE PROPRIÉTÉS
REDIRECTION DES FLUX SYSTEM.OUT ET SYSTEM.ERR DANS UNE JTEXT...
Source avec Zip Source avec une capture FENÊTRE POUR INTERROGER UNE BASE DE DONNÉE

 Sources de la même categorie

Source avec Zip Source avec une capture ZFS GESTION DU BOOTLOADER par 78.ultima
RECHERCHE LDAP AVEC PAGINATION par caiman125
Source avec Zip Source avec une capture CLASSEXPLORER : EXPLORATEUR DE CLASSES JAVA par Chatbour
Source avec Zip APPLICATION DES SEMAPHORE POUR LA RESOLUTION DU PROBLEME DES... par shaft_amine
Source avec Zip JAVA ET TERMINAL-CAPABILITY par sheorogath

 Sources en rapport avec celle ci

Source avec Zip Source avec une capture UN JEU COMPLET EN JPA par ulm950
Source avec Zip JOURNAL INTIME par sheorogath
Source avec Zip Source avec une capture MULTI CONNEXIONS À MULTIPLES MOTEURS DE BASES DE DONNÉES par oliverdev
Source avec Zip SAISIE DE JOURNAL COMPTABLE par kv
Source avec Zip Source avec une capture LOGVIEWER par aaymon

Commentaires et avis

Commentaire de boumarsel le 13/02/2008 13:28:42

Bonjour,

Pourquoi pas un zip? ça vous dérange autant qu'on arrive à tester facilement votre source?! :)

Personnellement j'ai commencé mais j'ai vu qu'il y'a un jar à récupérer un Main à créer, j'ai finit donc par laisser tomber.

Crdt,

Commentaire de twinser le 13/02/2008 21:11:58

Cette source s'adresse à ceux qui ont déjà un projet avec un logger "Log4j" correctement configuré. Cette fenêtre permet de voir alors les journaux du logiciel et permet à l'utilisateur final de connaître la provenance de ses erreurs.

Pour un simple test, c'est vrai qu'il y a du boulot. Je m'adresse seulement à 0,1% de la population de ce site mais j'espère qu'en proposant ma source qu'elle aidera certains.

Commentaire de boumarsel le 14/02/2008 10:34:41

Ok j'ai compris, mais je pense qu'avec 10 minutes de travail de plus tu pourras arriver à 80% de la population non?

Je pense qu'un tuto serait la bienvenue aussi, bcp de gens ignorent l'utilité de log4j et continuent à se casser la tête avec le débogage ou en suivant les exceptions sur la console.

Dans le monde professionnel de java on utilise dans la quasi-totalité des projets le log4j pour remonter les différents niveaux d'informations : error, warning...

Commentaire de sgamier le 20/02/2008 08:35:05

Il existe Lumbermill qui fait exactement ca... et meme bien plus :-)
http://traxel.com/lumbermill/

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

log4j deux fichiers .log [ par betty555 ] Bonjour, J'ai configuré mon fichier log4j.properties que j'ai rajouté dans mon classpath. Le problème c'est que j'ai bien la création de mon fichier log de la machine virtuelle et performance ! [ par jfrancois570 ] Lorsqu’on configure le log JAVA de la machine virtuelle. Dans le panneau de configuration JAVA, tab Advanced, cocher Enable tracing et Enable loggin Log applicative [ par darktonight ] Euh question de vocalulaire mais ca veut dire quoi "Trace dans la log applicative" ?C'est dans les recommandations de mon exercice. Java tel mobile ? -> Quel log ? [ par guizmo123 ] Salut tout le monde !Voilà j'ai un problème, je sais qu'on peut créer des logiciels en java pour téléphone mobiles tels que Nokia ou encore Sageme myx fichier log [ par merie ] quelq poura me dire comment je peut avoir des fichier log d'une site d'enseignement à distance postgres sous windows XP [ par geraldl ] geraldoBonjour à tous,voici ma première tentative sur javafr. En fait j'ai une question concernant postgres installé sous windows (version 7.5). J'ai Pb avec les log [ par neo1260 ] Bonjour, j'essay d'ajouter a mon programme, un systéme de fichier de log, pour ça je m'aide de l'API logging et de l'aide http://cyberzoide.developpez TexteArea et couleur [ par bandw ] Bonjour, Vu que la derniere fois j'ai eu une réponse ( et une bonne en plus :) )je reviens poser une question.. Peut etre qu'un jour c'est moi qui rep Log ou exception [ par neo1260 ] Bonjour, dans mon programme j'ai décidé d'utiliser les log pour tracer les informations général mais aussi les erreurs. C'est log sont redirigés vers Problème de double [ par Xalendar ] Bon mon probl&#232;me est simple je construis une HashMap de log de probabilit&#233; et toute mes proba qui sont au format double se bloquent 0.0 donc


Nos sponsors


Sondage...

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,546 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales