mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-02-16 13:14:49 +00:00
Changed Debug.Console methods to log all messages marked as such to log; ssh cleanup
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -293,8 +293,6 @@ namespace PepperDash.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void HandleConnectionFailure()
|
void HandleConnectionFailure()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (Client != null)
|
if (Client != null)
|
||||||
Client.Disconnect();
|
Client.Disconnect();
|
||||||
KillStream();
|
KillStream();
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ namespace PepperDash.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public static void Console(uint level, IKeyed dev, string format, params object[] items)
|
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,
|
public static void Console(uint level, IKeyed dev, ErrorLogLevel errorLogLevel,
|
||||||
string format, params object[] items)
|
string format, params object[] items)
|
||||||
{
|
{
|
||||||
|
var str = string.Format("[{0}] {1}", dev.Key, string.Format(format, items));
|
||||||
|
LogError(errorLogLevel, str);
|
||||||
if (Level >= level)
|
if (Level >= level)
|
||||||
{
|
{
|
||||||
var str = string.Format("[{0}] {1}", dev.Key, string.Format(format, items));
|
|
||||||
Console(level, str);
|
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,
|
public static void Console(uint level, ErrorLogLevel errorLogLevel,
|
||||||
string format, params object[] items)
|
string format, params object[] items)
|
||||||
{
|
{
|
||||||
if (Level >= level)
|
var str = string.Format(format, items);
|
||||||
{
|
LogError(errorLogLevel, str);
|
||||||
var str = string.Format(format, items);
|
if (Level >= level)
|
||||||
Console(level, str);
|
{
|
||||||
LogError(errorLogLevel, str);
|
Console(level, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Pepperdash_Core")]
|
[assembly: AssemblyProduct("Pepperdash_Core")]
|
||||||
[assembly: AssemblyCopyright("Copyright © PepperDash 2016")]
|
[assembly: AssemblyCopyright("Copyright © PepperDash 2016")]
|
||||||
[assembly: AssemblyVersion("1.0.7.*")]
|
[assembly: AssemblyVersion("1.0.8.*")]
|
||||||
|
|||||||
Reference in New Issue
Block a user