mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for file server logging inconsistent, updates to Alfresco debug logging interface used by the file server code. ALF-4672.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22875 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -62,6 +62,7 @@ import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.extensions.config.element.GenericConfigElement;
|
||||
|
||||
/**
|
||||
* Alfresco File Server Configuration Bean Class
|
||||
@@ -407,7 +408,7 @@ public abstract class AbstractServerConfigurationBean extends ServerConfiguratio
|
||||
DebugConfigSection debugConfig = new DebugConfigSection( this);
|
||||
try
|
||||
{
|
||||
debugConfig.setDebug("org.alfresco.filesys.debug.FileServerDebugInterface", null);
|
||||
debugConfig.setDebug("org.alfresco.filesys.debug.FileServerDebugInterface", new GenericConfigElement( "params"));
|
||||
}
|
||||
catch ( InvalidConfigurationException ex)
|
||||
{
|
||||
|
@@ -77,6 +77,40 @@ public class FileServerDebugInterface extends DebugInterfaceBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output an exception
|
||||
*
|
||||
* @param ex Throwable
|
||||
* @param level int
|
||||
*/
|
||||
public void debugPrintln( Throwable ex, int level) {
|
||||
|
||||
// Check if the logging level is enabled
|
||||
|
||||
if ( level <= getLogLevel()) {
|
||||
|
||||
// Output the exception
|
||||
|
||||
switch ( level) {
|
||||
case Debug.Debug:
|
||||
logger.debug( ex, ex);
|
||||
break;
|
||||
case Debug.Info:
|
||||
logger.info( ex, ex);
|
||||
break;
|
||||
case Debug.Warn:
|
||||
logger.warn( ex, ex);
|
||||
break;
|
||||
case Debug.Fatal:
|
||||
logger.fatal( ex, ex);
|
||||
break;
|
||||
case Debug.Error:
|
||||
logger.error( ex, ex);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output to the logger at the appropriate log level
|
||||
*
|
||||
|
Reference in New Issue
Block a user