Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Controlling logs on server

    Hi,

    We are using SmartGWT Pro 3.0 version.

    When we export the ListGrid data as excel we see lots of logs printed on the server. I have below mentioned queries on logging.

    1. How we can control the logs printed on server.(show/hide)
    2. Can we define the log level to be printed on server, like INFO, DEBUG, FATAL.

    see the below logs for reference:-

    03:45:42,555 INFO [STDOUT] === 2012-05-01 03:45:42,555 [43-2] INFO IDACall - Performing 1 operation(s)
    03:45:42,560 INFO [STDOUT] === 2012-05-01 03:45:42,560 [43-2] DEBUG RPCDMI - appConfig: isc.Application.create({
    rpcBindings:[
    {
    ID:"builtin",
    className:"com.isomorphic.rpc.BuiltinRPC",
    visibleMethods:[
    { name:"downloadWSDL" },
    { name:"downloadClientContent" },
    { name:"downloadClientExport" },
    { name:"xmlToJS" },
    { name:"uploadProgressCheck" },
    { name:"saveFile" },
    { name:"appendToFile" },
    { name:"loadFile" },
    { name:"deleteFile" },
    { name:"loadSharedXML" },
    { name:"saveSharedXML" },
    { name:"getAvailableScriptEngines" },
    { name:"devConsoleEvalServerScript" },
    { name:"evalJava" },
    { name:"getLogNames" },
    { name:"getLogEntries" },
    { name:"getLogThresholds" },
    { name:"setLogThreshold" },
    { name:"getPdfObject" }
    ]
    },
    {
    ID:"builtin_tools",
    className:"com.isomorphic.tools.BuiltinRPC",
    visibleMethods:[
    { name:"getDataSourceFromTable" },
    { name:"getDataSourceJSONFromTable" },
    { name:"getDataSourceFromHibernateMapping" },
    { name:"getDataSourceJSONFromHibernateMapping" },
    { name:"getTables" },
    { name:"getFieldsFromTable" },
    { name:"getBeanFields" },
    { name:"getHibernateBeans" },
    { name:"getDatabaseProductNameAndVersion" },
    { name:"getDatabaseTableTypes" },
    { name:"setAttributes" },
    { name:"clearAttributes" },
    { name:"getAttributes" },
    { name:"getAttribute" },
    { name:"getDataSourceConfigFromJavaClass" },
    {
    args:"cName",
    language:"groovy",
    name:"getJavaSource",
    script:"\n if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\"); \n //import org.apache.bcel.Repository;\n\n try {\n return org.apache.bcel.Repository.lookupClass(cName).toString();\n } catch (Throwable e) {\n return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n }\n "
    },
    { name:"loadDataSource" },
    { name:"dsFromXML" },
    { name:"dsConfigFromXML" },
    { name:"getDefinedDataSources" }
    ]
    },
    {
    ID:"builtin_adminconsole",
    className:"com.isomorphic.tools.AdminConsole",
    visibleMethods:[
    { name:"getDefinedDatabases" },
    { name:"testDB" },
    { name:"saveDBConfig" },
    { name:"setDefaultDB" },
    { name:"importDataSources" },
    { name:"discoverJNDIDatabases" }
    ]
    }
    ]
    })
    03:45:42,561 INFO [STDOUT] === 2012-05-01 03:45:42,561 [43-2] INFO BuiltinRPC - Export data passed to server:
    [
    { Period:"May-12", Transactions:"365", "Alerts Generated":"357", "Notifications Delivered":"0" },
    { Period:"Apr-12", Transactions:"162", "Alerts Generated":"183", "Notifications Delivered":"0" },
    { Period:"Mar-12", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Feb-12", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Jan-12", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Dec-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Nov-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Oct-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Sep-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Aug-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Jul-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" },
    { Period:"Jun-11", Transactions:"0", "Alerts Generated":"0", "Notifications Delivered":"0" }
    ]
    03:45:42,561 INFO [STDOUT] === 2012-05-01 03:45:42,561 [43-2] INFO BuiltinRPC - Generating and streaming csv file...
    03:45:42,568 INFO [STDOUT] === 2012-05-01 03:45:42,568 [43-2] DEBUG DataExport - Export took 7ms
    03:45:42,568 INFO [STDOUT] === 2012-05-01 03:45:42,568 [43-2] DEBUG RPCDMI - rpc returned data

    #2
    The logging system uses Apache Log4j.

    The configuration file is log4j.isc.xml and you can refer to Log4j documentation for all settings found in this file.

    Comment


      #3
      I found config file log4j.isc.config.xml and replaced all the 'INFO' level logging to 'DEBUG' and it suppressed most of the logs but still I am getting some logs on my console mentioned below. Can I know where I can change the log level for these logs.

      === 2012-09-11 15:55:26,409 [80-6] INFO BuiltinRPC - Export data passed to server:
      [
      {
      Period:"Sep-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Aug-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Jul-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Jun-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"May-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Apr-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Mar-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Feb-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Jan-12",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Dec-11",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Nov-11",
      Transactions:"0",
      "Alerts Generated":"0"
      },
      {
      Period:"Oct-11",
      Transactions:"0",
      "Alerts Generated":"0"
      }
      ]
      === 2012-09-11 15:55:26,413 [80-6] INFO BuiltinRPC - Generating and streaming csv file...

      Comment


        #4
        Awaiting your reply on this.

        Comment


          #5
          Why are you having any special trouble with this log?

          All logs include their category name as part of the log - in this case just the leaf (BuiltinRPC). The full category name can be revealed by changing the ConversionPattern (see log4j documentation). In this case it happens to be com.isomorphic.rpc.BuiltinRPC.

          Comment


            #6
            No such package entry was mentioned in the log4j.isc.config.xml, I added the below mentioned entry in this file

            <category name="com.isomorphic.rpc.BuiltinRPC">
            <priority value="DEBUG" />
            </category>

            but still I am getting the same logs which I mentioned earlier.

            Comment


              #7
              Once again, look at the ConversionPattern to see how you can reveal the full category name.

              Please refer to the log4j documentation and/or log4j forums if you have further questions on controlling log output on a per-category basis.

              Comment

              Working...
              X