loggingconsoleadempiere

Change console behavior of Adempiere - Modification of Entries


When Adempiere 380LTS starts a black CMD window opens and following

Adempiere_HOME is not set.
You may not be able to start Adempiere 2.0
Set ADEMPIERE_HOME to the directory of Adempiere 2.0.
You could set it via WinEnv.js e.g.:
cscript WinEnv.js C:\Adempiere C:\j2sdk1.4.2_08
Jul 13, 2015 9:55:00 AM org.compiere.util.Language getLanguage
INFO: Adding Language=en, Country=IN, Locale=en_IN
*** 2015-07-13 09:55:01.713 Adempiere Log (CLogConsole) ***

Now i want to change this, Adempiere Log (CLogConsole) to Welcome to Adempiere string, Can anyone help me where to do the required modifications, Which file to change in the build or the source code???


Solution

  • This message is coming from org.compiere.util.ClogFormatter

     public String getHead(Handler h) 
        {
            String className = h.getClass().getName();
            int index = className.lastIndexOf('.');
            if (index != -1)
                className = className.substring(index+1);
            StringBuffer sb = new StringBuffer()
                .append("*** ")
                .append(new Timestamp(System.currentTimeMillis()))
                .append(" Adempiere Log (").append(className)
                .append(") ***").append(NL);
            return sb.toString(); 
        }   //  getHead
    

    But I don't think you really want to change this.

    What you are seeing is the technical logging of what is happening internally and users have no reason to know this. If you have installed the swing client via WebStart this will not be visible to user but if you manually install the swing it does appear by default and it is expected that you will redirect this logging to a logfile. I would recommend the webstart install as it makes apply updates easier - every time the webstart client starts it checks the server to ensure it has the latest version and if not downloads it from the server and installs. So deployment of updates becomes very easy and you don't have to go around a bunch of PCs to remove the current client and re-install!