Changed Debug.Console methods to log all messages marked as such to log; ssh cleanup

This commit is contained in:
Heath Volmer
2018-08-31 11:50:01 -05:00
parent 7c2f4c2c24
commit 07aef1878c
5 changed files with 13 additions and 12 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -293,8 +293,6 @@ namespace PepperDash.Core
/// </summary>
void HandleConnectionFailure()
{
if (Client != null)
Client.Disconnect();
KillStream();

View File

@@ -234,7 +234,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Appends a device Key to the beginning of a message
/// Logs to Console when at-level, and all messages to error log, including device key
/// </summary>
public static void Console(uint level, IKeyed dev, string format, params object[] items)
{
@@ -245,23 +245,26 @@ namespace PepperDash.Core
public static void Console(uint level, IKeyed dev, ErrorLogLevel errorLogLevel,
string format, params object[] items)
{
var str = string.Format("[{0}] {1}", dev.Key, string.Format(format, items));
LogError(errorLogLevel, str);
if (Level >= level)
{
var str = string.Format("[{0}] {1}", dev.Key, string.Format(format, items));
Console(level, str);
LogError(errorLogLevel, str);
}
}
/// <summary>
/// Logs to Console when at-level, and all messages to error log
/// </summary>
public static void Console(uint level, ErrorLogLevel errorLogLevel,
string format, params object[] items)
{
if (Level >= level)
{
var str = string.Format(format, items);
Console(level, str);
LogError(errorLogLevel, str);
}
var str = string.Format(format, items);
LogError(errorLogLevel, str);
if (Level >= level)
{
Console(level, str);
}
}
/// <summary>

View File

@@ -4,4 +4,4 @@
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Pepperdash_Core")]
[assembly: AssemblyCopyright("Copyright © PepperDash 2016")]
[assembly: AssemblyVersion("1.0.7.*")]
[assembly: AssemblyVersion("1.0.8.*")]