Logging cleanup

This commit is contained in:
denny
2016-01-15 09:50:10 -05:00
parent 5807bb191e
commit 663378ad20
4 changed files with 27 additions and 45 deletions

View File

@@ -100,7 +100,7 @@ public class PlaylistManager
} }
catch( Exception e ) catch( Exception e )
{ {
mLog.error( "PlaylistManager - couldn't create file to save " mLog.error( "couldn't create file to save "
+ "playlist [" + filePath.toString() + "]" ); + "playlist [" + filePath.toString() + "]" );
} }
@@ -122,14 +122,12 @@ public class PlaylistManager
} }
catch ( JAXBException e ) catch ( JAXBException e )
{ {
mLog.error( "PlaylistManager - jaxb exception while saving " + mLog.error( "jaxb exception while saving playlist: ", e );
"playlist: ", e );
} }
} }
catch ( Exception e ) catch ( Exception e )
{ {
mLog.error( "PlaylistManager - coulcn't open outputstream to " + mLog.error( "coulcn't open outputstream to save playlist [" + filePath.toString() + "]", e );
"save playlist [" + filePath.toString() + "]", e );
} }
finally finally
{ {
@@ -155,8 +153,7 @@ public class PlaylistManager
{ {
if( Files.exists( playlistPath ) ) if( Files.exists( playlistPath ) )
{ {
mLog.info( "PlaylistManager - loading playlist file [" + mLog.info( "loading playlist file [" + playlistPath.toString() + "]" );
playlistPath.toString() + "]" );
JAXBContext context = null; JAXBContext context = null;
@@ -176,14 +173,12 @@ public class PlaylistManager
} }
catch ( JAXBException e ) catch ( JAXBException e )
{ {
mLog.error( "PlaylistManager - jaxb exception while loading " + mLog.error( "jaxb exception while loading playlist: ", e );
"playlist: ", e );
} }
} }
catch ( Exception e ) catch ( Exception e )
{ {
mLog.error( "PlaylistManager - coulcn't open inputstream to " + mLog.error( "coulcn't open inputstream to load playlist [" + playlistPath.toString() + "]", e );
"load playlist [" + playlistPath.toString() + "]", e );
} }
finally finally
{ {
@@ -195,7 +190,7 @@ public class PlaylistManager
} }
catch ( IOException e ) catch ( IOException e )
{ {
mLog.error( "PlaylistManager - exception while closing " + mLog.error( "exception while closing " +
"the playlist file inputstream reader", e ); "the playlist file inputstream reader", e );
} }
} }
@@ -203,8 +198,7 @@ public class PlaylistManager
} }
else else
{ {
mLog.info( "PlaylistManager - playlist does not exist [" + mLog.info( "playlist does not exist [" + playlistPath.toString() + "]" );
playlistPath.toString() + "]" );
} }
if( mPlaylist == null ) if( mPlaylist == null )

View File

@@ -87,13 +87,11 @@ public class SystemProperties
mProperties.store( out, comments ); mProperties.store( out, comments );
mLog.info( "SystemProperties - saved current properties [" + mLog.info( "saved current properties [" + propsPath.toString() + "]" );
propsPath.toString() + "]" );
} }
catch( Exception e ) catch( Exception e )
{ {
mLog.error( "SystemProperties - exception while saving " + mLog.error( "exception while saving application properties", e );
"application properties", e );
} }
finally finally
{ {
@@ -146,8 +144,7 @@ public class SystemProperties
} }
catch ( IOException e ) catch ( IOException e )
{ {
mLog.error( "SystemProperties - exception while creating " + mLog.error( "exception while creating app folder [" + folder + "]", e );
"app folder [" + folder + "]", e );
} }
} }
@@ -158,11 +155,11 @@ public class SystemProperties
{ {
if( mPropertiesPath == null ) if( mPropertiesPath == null )
{ {
mLog.info( "SystemProperties - no properties file loaded - using defaults" ); mLog.info( "no properties file loaded - using defaults" );
} }
else else
{ {
mLog.info( "SystemProperties - application properties loaded [" + mPropertiesPath.toString() + "]" ); mLog.info( "application properties loaded [" + mPropertiesPath.toString() + "]" );
} }
} }
@@ -184,7 +181,7 @@ public class SystemProperties
} }
catch ( FileNotFoundException e ) catch ( FileNotFoundException e )
{ {
mLog.error( "SDRTrunk - exception while opening inputstream on " + mLog.error( "exception while opening inputstream on " +
"application properties file", e ); "application properties file", e );
} }
@@ -196,7 +193,7 @@ public class SystemProperties
} }
catch ( IOException e ) catch ( IOException e )
{ {
mLog.error( "SDRTrunk - exception while loading properties " + mLog.error( "exception while loading properties " +
"inputstream into SystemProperties", e ); "inputstream into SystemProperties", e );
} }
finally finally
@@ -212,8 +209,7 @@ public class SystemProperties
} }
} }
mLog.info( "SystemProperties - loaded [" + mLog.info( "loaded [" + propertiesPath.toString() + "]" );
propertiesPath.toString() + "]" );
} }
/** /**

View File

@@ -431,8 +431,7 @@ public class SettingsManager
} }
/* Something happened ... the above should always return an icon */ /* Something happened ... the above should always return an icon */
mLog.error( "SettingsManager - couldn't return an icon named [" + mLog.error( "couldn't return an icon named [" + name + "] of heigh [" + height + "]" );
name + "] of heigh [" + height + "]" );
} }
return null; return null;
@@ -630,8 +629,7 @@ public class SettingsManager
return r820TConfig; return r820TConfig;
default: default:
throw new IllegalArgumentException( "TunerConfiguration" throw new IllegalArgumentException( "tuner type is unrecognized [" +
+ "Directory - tuner type is unrecognized [" +
type.toString() + "]" ); type.toString() + "]" );
} }
} }
@@ -705,8 +703,7 @@ public class SettingsManager
} }
catch( Exception e ) catch( Exception e )
{ {
mLog.error( "SettingsManager - couldn't create file to save " mLog.error( "couldn't create file to save settings [" + filePath.toString() + "]", e );
+ "settings [" + filePath.toString() + "]", e );
} }
OutputStream out = null; OutputStream out = null;
@@ -727,14 +724,12 @@ public class SettingsManager
} }
catch ( JAXBException e ) catch ( JAXBException e )
{ {
mLog.error( "SettingsManager - jaxb exception while saving " + mLog.error( "jaxb exception while saving settings", e );
"settings", e );
} }
} }
catch ( Exception e ) catch ( Exception e )
{ {
mLog.error( "SettingsManager - coulcn't open outputstream to " + mLog.error( "couldn't open outputstream to save settings [" + filePath.toString() + "]" );
"save settings [" + filePath.toString() + "]" );
} }
finally finally
{ {
@@ -760,8 +755,7 @@ public class SettingsManager
{ {
if( Files.exists( settingsPath ) ) if( Files.exists( settingsPath ) )
{ {
mLog.info( "SettingsManager - loading settings file [" + mLog.info( "loading settings file [" + settingsPath.toString() + "]" );
settingsPath.toString() + "]" );
JAXBContext context = null; JAXBContext context = null;
@@ -781,13 +775,13 @@ public class SettingsManager
} }
catch ( JAXBException e ) catch ( JAXBException e )
{ {
mLog.error( "SettingsManager - jaxb exception while loading " + mLog.error( "jaxb exception while loading " +
"settings", e ); "settings", e );
} }
} }
catch ( Exception e ) catch ( Exception e )
{ {
mLog.error( "SettingsManager - coulcn't open inputstream to " + mLog.error( "coulcn't open inputstream to " +
"load settings [" + settingsPath.toString() + "]", e ); "load settings [" + settingsPath.toString() + "]", e );
} }
finally finally
@@ -800,7 +794,7 @@ public class SettingsManager
} }
catch ( IOException e ) catch ( IOException e )
{ {
mLog.error( "SettingsManager - exception while closing " + mLog.error( "exception while closing " +
"the settings file inputstream reader", e ); "the settings file inputstream reader", e );
} }
} }
@@ -808,8 +802,7 @@ public class SettingsManager
} }
else else
{ {
mLog.info( "SettingsManager - settings does not exist [" + mLog.info( "settings does not exist [" + settingsPath.toString() + "]" );
settingsPath.toString() + "]" );
} }
if( mSettings == null ) if( mSettings == null )

View File

@@ -143,8 +143,7 @@ public class RecordingSourceManager
ArrayList<RecordingConfiguration> recordingConfigurations = ArrayList<RecordingConfiguration> recordingConfigurations =
settingsManager.getRecordingConfigurations(); settingsManager.getRecordingConfigurations();
mLog.info( "RecordingSourceManager - discovered [" + mLog.info( "discovered [" + recordingConfigurations.size() + "] recording configurations" );
recordingConfigurations.size() + "] recording configurations" );
for( RecordingConfiguration config: recordingConfigurations ) for( RecordingConfiguration config: recordingConfigurations )
{ {