Project

General

Profile

« Previous | Next » 

Revision 2588

Added by sgarg over 19 years ago

Replacing debugMessage with log4j methods for logging

View differences:

src/edu/ucsb/nceas/metacat/AccessRule.java
87 87
    // create a new object
88 88
    AccessRule newRule = new AccessRule();
89 89
    // set permissiontype
90
    MetaCatUtil.debugMessage("copy permission type: "+
91
                              this.getPermissionType(), 35);
90
    MetaCatUtil.logMetacat.info("copy permission type: "+
91
                              this.getPermissionType());
92 92
    newRule.setPermissionType(this.getPermissionType());
93 93
    // set permission
94
    MetaCatUtil.debugMessage("copy permission: "+
95
                              this.getPermission(), 35);
94
    MetaCatUtil.logMetacat.info("copy permission: "+
95
                              this.getPermission());
96 96
    newRule.setPermission(this.getPermission());
97 97
    // walk through all the principals
98 98
    Vector principalVector = this.getPrincipal();
99 99
    for (int i=0; i<principalVector.size(); i++)
100 100
    {
101 101
      String name = (String)principalVector.elementAt(i);
102
      MetaCatUtil.debugMessage("copy principle: "+ name, 35);
102
      MetaCatUtil.logMetacat.info("copy principle: "+ name);
103 103
      // Add this name to newrules
104 104
      newRule.addPrincipal(name);
105 105
    }
src/edu/ucsb/nceas/metacat/AccessControlForSingleFile.java
109 109
        permOrder = AccessControlInterface.ALLOWFIRST;
110 110
      }
111 111
      //debugMessage
112
      MetaCatUtil.debugMessage("docid in AccessControlForSingleFiel: " +
113
                                docId, 30);
114
      MetaCatUtil.debugMessage("principal in AccessControlForSingleFiel: " +
115
                                principal, 30);
116
      MetaCatUtil.debugMessage("permission in AccessControlForSingleFiel: " +
117
                                permission, 30);
118
      MetaCatUtil.debugMessage("permType in AccessControlForSingleFiel: " +
119
                                permType, 30);
120
      MetaCatUtil.debugMessage("permOrder in AccessControlForSingleFiel: " +
121
                                permOrder, 30);
112
      MetaCatUtil.logMetacat.info("docid in AccessControlForSingleFiel: " +
113
                                docId);
114
      MetaCatUtil.logMetacat.info("principal in AccessControlForSingleFiel: " +
115
                                principal);
116
      MetaCatUtil.logMetacat.info("permission in AccessControlForSingleFiel: " +
117
                                permission);
118
      MetaCatUtil.logMetacat.info("permType in AccessControlForSingleFiel: " +
119
                                permType);
120
      MetaCatUtil.logMetacat.info("permOrder in AccessControlForSingleFiel: " +
121
                                permOrder);
122 122
    }
123 123
    catch (Exception e)
124 124
    {
125
      MetaCatUtil.debugMessage("Error in construct of AccessControlForSingle" +
126
                               "File: " + e.getMessage(), 30);
125
      MetaCatUtil.logMetacat.info("Error in construct of AccessControlForSingle" +
126
                               "File: " + e.getMessage());
127 127
      throw e;
128 128
    }
129 129
  }
......
165 165
    }//try
166 166
    catch (SQLException e)
167 167
    {
168
      MetaCatUtil.debugMessage("Error in AccessControlForSingleFile.insert" +
169
                               "Permissions: " + e.getMessage(), 30);
168
      MetaCatUtil.logMetacat.info("Error in AccessControlForSingleFile.insert" +
169
                               "Permissions: " + e.getMessage());
170 170
      throw e;
171 171
    }
172 172
    finally

Also available in: Unified diff