From 611a5b35e76bd7d168376405ff7f699d01aa12fb Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Fri, 19 Jan 2018 21:10:23 +0100 Subject: [PATCH] Removed duplicated log entries --- Vocaluxe/Base/CGraphics.cs | 3 --- Vocaluxe/Base/CSongs.cs | 9 ++------- Vocaluxe/Base/Fonts/CFonts.cs | 3 +-- Vocaluxe/Program.cs | 28 ++++------------------------ Vocaluxe/Screens/CScreenLoad.cs | 4 +--- 5 files changed, 8 insertions(+), 39 deletions(-) diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs index 5d5be4da..5d854bf8 100644 --- a/Vocaluxe/Base/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -63,7 +63,6 @@ namespace Vocaluxe.Base public static void Init() { // Add Screens, must be the same order as in EScreens! - CLog.Information("Build Screen List"); using (CBenchmark.Time("Build Screen List")) { _Screens.Add(new CScreenTest()); @@ -100,7 +99,6 @@ namespace Vocaluxe.Base GlobalAlpha = 1f; ZOffset = 0f; - CLog.Information("Load Theme"); using (CBenchmark.Time("Load Theme")) { LoadTheme(); @@ -121,7 +119,6 @@ namespace Vocaluxe.Base for (int i = 0; i < _Screens.Count; i++) { - CLog.Information("Load Theme " + Enum.GetNames(typeof(EScreen))[i]); using (CBenchmark.Time("Load Theme " + Enum.GetNames(typeof(EScreen))[i])) { _Screens[i].Init(); diff --git a/Vocaluxe/Base/CSongs.cs b/Vocaluxe/Base/CSongs.cs index 5c9b1943..d3670c80 100644 --- a/Vocaluxe/Base/CSongs.cs +++ b/Vocaluxe/Base/CSongs.cs @@ -334,15 +334,13 @@ namespace Vocaluxe.Base public static void LoadSongs() { - CLog.Information("Load Songs"); using (CBenchmark.Time("Load Songs")) { SongsLoaded = false; _Songs.Clear(); var files = new List(); - - CLog.Information("List Songs"); + using (CBenchmark.Time("List Songs")) { @@ -357,7 +355,6 @@ namespace Vocaluxe.Base } } - CLog.Information("Read TXTs"); using (CBenchmark.Time("Read TXTs")) { foreach (string file in files) @@ -370,8 +367,7 @@ namespace Vocaluxe.Base _Songs.Add(song); } } - - CLog.Information("Sort Songs"); + using (CBenchmark.Time("Sorted Songs")) { Sorter.SongSorting = CConfig.Config.Game.SongSorting; @@ -408,7 +404,6 @@ namespace Vocaluxe.Base private static void _LoadCovers() { - CLog.Information("Load Covers"); using (CBenchmark.Time("Loaded Covers")) { int songCount = _Songs.Count; diff --git a/Vocaluxe/Base/Fonts/CFonts.cs b/Vocaluxe/Base/Fonts/CFonts.cs index fbb7d236..545b6c7f 100644 --- a/Vocaluxe/Base/Fonts/CFonts.cs +++ b/Vocaluxe/Base/Fonts/CFonts.cs @@ -288,8 +288,7 @@ namespace Vocaluxe.Base.Fonts return false; } } - - CLog.Information("Build Glyphs"); + using (CBenchmark.Time("Build Glyphs")) { _BuildGlyphs(); diff --git a/Vocaluxe/Program.cs b/Vocaluxe/Program.cs index 1c531a16..c4f04c18 100644 --- a/Vocaluxe/Program.cs +++ b/Vocaluxe/Program.cs @@ -103,15 +103,13 @@ namespace Vocaluxe if (!CProgrammHelper.CheckRequirements()) return; CProgrammHelper.Init(); - - CLog.Information("Init Program"); + using (CBenchmark.Time("Init Program")) { CMain.Init(); Application.DoEvents(); // Init Language - CLog.Information("Init Language"); using (CBenchmark.Time("Init Language")) { if (!CLanguage.Init()) @@ -121,7 +119,6 @@ namespace Vocaluxe Application.DoEvents(); // load config - CLog.Information("Init Config"); using (CBenchmark.Time("Init Config")) { CConfig.LoadCommandLineParams(args); @@ -137,7 +134,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Draw - CLog.Information("Init Draw"); using (CBenchmark.Time("Init Draw")) { if (!CDraw.Init()) @@ -147,7 +143,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Playback - CLog.Information("Init Playback"); using (CBenchmark.Time("Init Playback")) { if (!CSound.Init()) @@ -157,7 +152,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Record - CLog.Information("Init Record"); using (CBenchmark.Time("Init Record")) { if (!CRecord.Init()) @@ -167,7 +161,6 @@ namespace Vocaluxe Application.DoEvents(); // Init VideoDecoder - CLog.Information("Init Videodecoder"); using (CBenchmark.Time("Init Videodecoder")) { if (!CVideo.Init()) @@ -177,7 +170,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Database - CLog.Information("Init Database"); using (CBenchmark.Time("Init Database")) { if (!CDataBase.Init()) @@ -187,7 +179,6 @@ namespace Vocaluxe Application.DoEvents(); //Init Webcam - CLog.Information("Init Webcam"); using (CBenchmark.Time("Init Webcam")) { if (!CWebcam.Init()) @@ -197,7 +188,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Background Music - CLog.Information("Init Background Music"); using (CBenchmark.Time("Init Background Music")) { CBackgroundMusic.Init(); @@ -206,7 +196,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Profiles - CLog.Information("Init Profiles"); using (CBenchmark.Time("Init Profiles")) { CProfiles.Init(); @@ -215,7 +204,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Fonts - CLog.Information("Init Fonts"); using (CBenchmark.Time("Init Fonts")) { if (!CFonts.Init()) @@ -225,14 +213,12 @@ namespace Vocaluxe Application.DoEvents(); // Theme System - CLog.Information("Init Theme"); using (CBenchmark.Time("Init Theme")) { if (!CThemes.Init()) throw new CLoadingException("theme"); } - - CLog.Information("Load Theme"); + using (CBenchmark.Time("Load Theme")) { CThemes.Load(); @@ -241,7 +227,6 @@ namespace Vocaluxe Application.DoEvents(); // Load Cover - CLog.Information("Init Cover"); using (CBenchmark.Time("Init Cover")) { if (!CCover.Init()) @@ -251,7 +236,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Screens - CLog.Information("Init Screens"); using (CBenchmark.Time("Init Screens")) { CGraphics.Init(); @@ -260,7 +244,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Server - CLog.Information("Init Server"); using (CBenchmark.Time("Init Server")) { CVocaluxeServer.Init(); @@ -269,7 +252,6 @@ namespace Vocaluxe Application.DoEvents(); // Init Input - CLog.Information("Init Input"); using (CBenchmark.Time("Init Input")) { CController.Init(); @@ -278,8 +260,7 @@ namespace Vocaluxe Application.DoEvents(); - // Init Game; - CLog.Information("Init Game"); + // Init Game using (CBenchmark.Time("Init Game")) { CGame.Init(); @@ -289,8 +270,7 @@ namespace Vocaluxe Application.DoEvents(); - // Init Party Modes; - CLog.Information("Init Party Modes"); + // Init Party Modes using (CBenchmark.Time("Init Party Modes")) { if (!CParty.Init()) diff --git a/Vocaluxe/Screens/CScreenLoad.cs b/Vocaluxe/Screens/CScreenLoad.cs index 38f28903..9057f4b2 100644 --- a/Vocaluxe/Screens/CScreenLoad.cs +++ b/Vocaluxe/Screens/CScreenLoad.cs @@ -126,8 +126,7 @@ namespace Vocaluxe.Screens foreach (CVideoPlayer videoPlayer in _Intros) videoPlayer.PreLoad(); } - - CLog.Information("Load Songs Full"); + _TimerLoadSongsFull = CBenchmark.Time("Loaded Songs Full"); _SongLoaderThread = new Thread(CSongs.LoadSongs) {Name = "SongLoader", IsBackground = true}; @@ -186,7 +185,6 @@ namespace Vocaluxe.Screens _TimerLoadSongsFull.Dispose(); //Init Playlists - CLog.Information("Init Playlists"); using (CBenchmark.Time("Init Playlists")) { CPlaylists.Init();