diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 1ec00447..ff0c6981 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -140,7 +140,8 @@ namespace SparkleShare { Process.StartInfo.RedirectStandardOutput = true; Process.StartInfo.UseShellExecute = false; - Console.WriteLine ("[Git][" + RepoName + "] Cloning repository..."); + SparkleHelpers.DebugInfo ("Config", + "[" + RepoName + "] Cloning repository..."); // Clone into the system's temporary folder Process.StartInfo.FileName = "git"; @@ -198,7 +199,8 @@ namespace SparkleShare { // folder to the SparkleShare folder Directory.Move (OldPath, NewPath); - Console.WriteLine ("[Git][" + RepoName + "] Repository cloned"); + SparkleHelpers.DebugInfo ("Git", + "[" + RepoName + "] Repository cloned"); // Show a confirmation notification SparkleBubble FinishedBubble = diff --git a/SparkleShare/SparkleHelpers.cs b/SparkleShare/SparkleHelpers.cs index de4e6763..b4980303 100644 --- a/SparkleShare/SparkleHelpers.cs +++ b/SparkleShare/SparkleHelpers.cs @@ -35,7 +35,8 @@ namespace SparkleShare { if (!Directory.Exists (AvatarPath)) { Directory.CreateDirectory (AvatarPath); - Console.WriteLine ("[Config] Created '" + AvatarPath + "'"); + SparkleHelpers.DebugInfo ("Config", + "Created '" + AvatarPath + "'"); } string AvatarFilePath = AvatarPath + Email; @@ -109,8 +110,8 @@ namespace SparkleShare { if (ShowDebugInfo) { DateTime DateTime = new DateTime (); string TimeStamp = DateTime.Now.ToString ("HH:mm:ss"); - Console.WriteLine ("[" + TimeStamp + "]" + - "[" + Type + "]" + Message); + Console.WriteLine ("[" + TimeStamp + "] " + + "[" + Type + "] " + Message); } } diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 0589c52d..707d1d6f 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -40,7 +40,8 @@ namespace SparkleShare { if (!Directory.Exists (SparklePath)) { Directory.CreateDirectory (SparklePath); - Console.WriteLine ("[Config] Created '" + SparklePath + "'"); + SparkleHelpers.DebugInfo ("Config", + "Created '" + SparklePath + "'"); // Add a special icon to the SparkleShare folder switch (SparklePlatform.Name) { @@ -98,7 +99,6 @@ namespace SparkleShare { Process.StartInfo.FileName = "gvfs-set-attribute"; Process.StartInfo.Arguments = Folder + " metadata::emblems [synced]"; -// Console.WriteLine (Process.StartInfo.FileName + " " + Process.StartInfo.Arguments); Process.Start (); break; } @@ -148,8 +148,9 @@ namespace SparkleShare { Watcher.EnableRaisingEvents = true; Watcher.Created += delegate (object o, FileSystemEventArgs args) { WatcherChangeTypes wct = args.ChangeType; - Console.WriteLine ("[Event][SparkleShare] " + wct.ToString () + - " '" + args.Name + "'"); + SparkleHelpers.DebugInfo ("Event", + wct.ToString () + + " '" + args.Name + "'"); SparkleDialog SparkleDialog = new SparkleDialog (); SparkleDialog.ShowAll (); }; @@ -162,11 +163,13 @@ namespace SparkleShare { if (!Directory.Exists (ConfigPath)) { Directory.CreateDirectory (ConfigPath); - Console.WriteLine ("[Config] Created '" + ConfigPath + "'"); + SparkleHelpers.DebugInfo ("Config", + "Created '" + ConfigPath + "'"); // Create a place to store the avatars Directory.CreateDirectory (AvatarPath); - Console.WriteLine ("[Config] Created '" + AvatarPath + "avatars'"); + SparkleHelpers.DebugInfo ("Config", + "Created '" + AvatarPath + "'"); }