mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 12:06:29 +00:00
Changed Debug.Console methods to log all messages marked as such to log; ssh cleanup
This commit is contained in:
parent
7c2f4c2c24
commit
07aef1878c
5 changed files with 13 additions and 12 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -293,8 +293,6 @@ namespace PepperDash.Core
|
|||
/// </summary>
|
||||
void HandleConnectionFailure()
|
||||
{
|
||||
|
||||
|
||||
if (Client != null)
|
||||
Client.Disconnect();
|
||||
KillStream();
|
||||
|
|
|
|||
|
|
@ -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,22 +245,25 @@ 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)
|
||||
{
|
||||
var str = string.Format(format, items);
|
||||
LogError(errorLogLevel, str);
|
||||
if (Level >= level)
|
||||
{
|
||||
var str = string.Format(format, items);
|
||||
Console(level, str);
|
||||
LogError(errorLogLevel, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.*")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue