help/en/help/configtab_logs.html | 4
src/com/netscape/admin/dirserv/dirserv.properties | 43 ++++---
src/com/netscape/admin/dirserv/panel/AccessLogConfigurePanel.java | 57 +++++++++-
src/com/netscape/admin/dirserv/panel/ErrorLogConfigurePanel.java | 4
4 files changed, 87 insertions(+), 21 deletions(-)
New commits:
commit c8566dadd049f29308ae736bf6a2cff713a2f768
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Mon Mar 7 10:31:20 2011 -0800
Bug 474113 - Allow access log level to be configured from Console
This adds a log level list to the access log configuration in Console. One can
select what log levels they want to set for the access log and update the
configuration
on the server. This was previously only possible for the errors log.
diff --git a/help/en/help/configtab_logs.html b/help/en/help/configtab_logs.html
index a37ada7..ce3721c 100644
--- a/help/en/help/configtab_logs.html
+++ b/help/en/help/configtab_logs.html
@@ -69,3 +69,7 @@ Note that the newly configured access mode will only affect new logs
that are cr
<p class="text">
<b>When a file is older than. </b>The server will delete an archived access
log when the file is older than the age you specify.
</p>
+
+<p class="text">
+<b>Log Level. </b>Specifies the kinds of access messages the server should
store in the access log. By default, the connections, operations, and results option is
selected. Multiple levels can be selected at the same time.
+</p>
diff --git a/src/com/netscape/admin/dirserv/dirserv.properties
b/src/com/netscape/admin/dirserv/dirserv.properties
index 14e9eca..3aa360a 100644
--- a/src/com/netscape/admin/dirserv/dirserv.properties
+++ b/src/com/netscape/admin/dirserv/dirserv.properties
@@ -971,24 +971,31 @@ log-viewLog-mnemonic=L
# log-viewLog-ttip=Show the current log contents in a dialog box
log-isAuditingEnabled-default=false
log-logLevel-title=Log Level
-log-logLevel-label=Log Level
-log-logLevel-ttip=Specifies the kinds of error and event messages the server should
store.
-log-logLevel-default=
-log-logLevel-1=Trace function calls
-log-logLevel-2=Packet handling
-log-logLevel-3=Heavy trace output
-log-logLevel-4=Connection management
-log-logLevel-5=Packets sent/received
-log-logLevel-6=Search filter processing
-log-logLevel-7=Config file processing
-log-logLevel-8=Access control list processing
-log-logLevel-9=Log communications with shell databases
-log-logLevel-10=Log entry parsing
-log-logLevel-11=Housekeeping
-log-logLevel-12=Replication
-log-logLevel-13=Entry cache
-log-logLevel-14=Plug-ins
-log-logLevel-15=Access control summary
+log-errorlogLevel-label=Log Level
+log-errorlogLevel-ttip=Specifies the kinds of error and event messages the server should
store.
+log-errorlogLevel-default=
+log-errorlogLevel-1=Trace function calls
+log-errorlogLevel-2=Packet handling
+log-errorlogLevel-3=Heavy trace output
+log-errorlogLevel-4=Connection management
+log-errorlogLevel-5=Packets sent/received
+log-errorlogLevel-6=Search filter processing
+log-errorlogLevel-7=Config file processing
+log-errorlogLevel-8=Access control list processing
+log-errorlogLevel-9=Log communications with shell databases
+log-errorlogLevel-10=Log entry parsing
+log-errorlogLevel-11=Housekeeping
+log-errorlogLevel-12=Replication
+log-errorlogLevel-13=Entry cache
+log-errorlogLevel-14=Plug-ins
+log-errorlogLevel-15=Access control summary
+log-accesslogLevel-label=Log Level
+log-accesslogLevel-ttip=Specifies the kinds of access messages the server should store.
+log-accesslogLevel-default=2
+log-accesslogLevel-1=Internal operations
+log-accesslogLevel-2=Connections, operations, and results
+log-accesslogLevel-3=Entry access and referrals
+log-accesslogLevel-4=Microsecond Timing
log-invalid-filename-title=Error Updating Directory
log-invalid-filename-msg=Invalid file name: %0
log-save-error-title=Error
diff --git a/src/com/netscape/admin/dirserv/panel/AccessLogConfigurePanel.java
b/src/com/netscape/admin/dirserv/panel/AccessLogConfigurePanel.java
index ddddb5f..bc54ece 100644
--- a/src/com/netscape/admin/dirserv/panel/AccessLogConfigurePanel.java
+++ b/src/com/netscape/admin/dirserv/panel/AccessLogConfigurePanel.java
@@ -63,12 +63,67 @@ public class AccessLogConfigurePanel extends LogPanel
super.init();
createEnableArea();
createConfigArea();
- addBottomGlue ();
+ createLevelArea();
+ addBottomGlue ();
enableFields( _cbEnabled.isSelected() );
super.postInit();
}
+ private void createLevelArea() {
+ _liLogLevel = makeJList("log","accesslogLevel", "");
+ JScrollPane spLogLevel = new JScrollPane(_liLogLevel);
+ DSEntrySet entries = getDSEntrySet();
+ DSEntryBitList logLevelDSEntry = new DSEntryBitList(_liLogLevel, _masks);
+
+ entries.add(LOG_DN, ACCESS_LEVEL_ATTR_NAME, logLevelDSEntry);
+ setComponentTable(_liLogLevel, logLevelDSEntry);
+
+ JPanel grid = new GroupPanel(_resource.getString( _section,
+ "logLevel-title" ));
+ grid.setLayout(new GridBagLayout());
+ GridBagConstraints gbc = new GridBagConstraints();
+
+ gbc.gridwidth = gbc.REMAINDER;
+ gbc.fill = gbc.HORIZONTAL;
+ gbc.anchor = gbc.CENTER;
+ gbc.ipady = 0;
+ gbc.weightx = 1.0;
+ gbc.weighty = 0.0;
+ gbc.gridx = gbc.RELATIVE;
+ gbc.gridy = gbc.RELATIVE;
+ gbc.insets = getComponentInsets();
+ gbc.insets.bottom = UIFactory.getDifferentSpace();
+ _myPanel.add(grid, gbc);
+
+ gbc.gridwidth = 1;
+ gbc.gridheight = 1;
+ gbc.anchor = gbc.CENTER;
+ gbc.ipady = 0;
+ gbc.weighty = 0.0;
+ gbc.insets = getComponentInsets();
+ gbc.anchor = gbc.WEST;
+ gbc.gridwidth = gbc.REMAINDER;
+ gbc.weightx = 1.0;
+ gbc.fill = gbc.HORIZONTAL;
+ grid.add(spLogLevel,gbc);
+ }
+
+ protected void enableFields( boolean enable ) {
+ if ( _liLogLevel != null )
+ _liLogLevel.setEnabled(enable);
+ super.enableFields( enable );
+ }
+
LogContentPanel getViewerPanel() {
return new AccessLogContentPanel( getModel() );
}
+
+ static final String ACCESS_LEVEL_ATTR_NAME = "nsslapd-accesslog-level";
+ private JList _liLogLevel;
+
+ // The log level to mask mapping is sparse, unfortunately
+ private static final int[] _masks = { 0x0004,
+ 0x0100,
+ 0x0200,
+ 0x20000 };
}
diff --git a/src/com/netscape/admin/dirserv/panel/ErrorLogConfigurePanel.java
b/src/com/netscape/admin/dirserv/panel/ErrorLogConfigurePanel.java
index f9d6f2d..a3a9a65 100644
--- a/src/com/netscape/admin/dirserv/panel/ErrorLogConfigurePanel.java
+++ b/src/com/netscape/admin/dirserv/panel/ErrorLogConfigurePanel.java
@@ -61,13 +61,13 @@ public class ErrorLogConfigurePanel extends LogPanel {
createEnableArea();
createConfigArea();
createLevelArea();
- addBottomGlue ();
+ addBottomGlue ();
enableFields( _cbEnabled.isSelected() );
super.postInit();
}
private void createLevelArea() {
- _liLogLevel = makeJList("log","logLevel", "");
+ _liLogLevel = makeJList("log","errorlogLevel", "");
JScrollPane spLogLevel = new JScrollPane(_liLogLevel);
DSEntrySet entries = getDSEntrySet();
Show replies by date