This commit is contained in:
2026-03-14 08:26:58 +03:30
parent 59a718a1b5
commit 75e1abd258
7 changed files with 724 additions and 38 deletions
+45 -19
View File
@@ -86,9 +86,7 @@ class XCAlert : public XCBase
return GetSpecificToken(this);
}
//
// Properties Getter(s) / Setter(s) ...
// #region Properties Getter(s) / Setter(s) ...
//
string GetPrefix()
{
@@ -174,16 +172,16 @@ class XCAlert : public XCBase
{
mTerminalAlerts = value;
}
// #endregion
//
// Tools Funtions ...
// #region Tools Funtions ...
//
// Alerts ...
//
// Logging an Alert ...
void LogAlert(string message)
void LogAlert(string message, bool save = true)
{
//
// Validate Args ...
@@ -194,15 +192,20 @@ class XCAlert : public XCBase
//
message = PrepareMessage(message);
//
Log(message);
Save(message);
//
if (save)
{
Save(message);
}
}
//
// Terminal Alert ...
void TerminalAlert(string message)
void TerminalAlert(string message, bool save = true)
{
//
// Validate Args ...
@@ -217,12 +220,17 @@ class XCAlert : public XCBase
// Send Terminal Alert ...
Alert(message);
Save(message);
//
if (save)
{
Save(message);
}
}
//
// Mail Alert ...
void MailAlert(string message)
void MailAlert(string message, bool save = true)
{
//
// Validate Args ...
@@ -234,12 +242,17 @@ class XCAlert : public XCBase
//
// Send Mail Alert ...
SendMail(GetPrefix(), message);
Save(message);
//
if (save)
{
Save(message);
}
}
//
// Send Push Notification ...
void PushAlert(string message)
void PushAlert(string message, bool save = true)
{
//
// Validate Args ...
@@ -255,7 +268,12 @@ class XCAlert : public XCBase
//
// Send Push Notification Alert ...
SendNotification(message);
Save(message);
//
if (save)
{
Save(message);
}
}
//
@@ -265,19 +283,25 @@ class XCAlert : public XCBase
{
//
// Handle Log, if Enabled ...
LogAlert(message);
LogAlert(message, false);
//
// Handle Mail if Enabled ...
MailAlert(message);
MailAlert(message, false);
//
// Handle Push if Enabled ...
PushAlert(message);
PushAlert(message, false);
//
// Handle Terminal if Enabled ...
TerminalAlert(message);
TerminalAlert(message, false);
//
if (GetEnableAlerts())
{
Save(message);
}
}
//
@@ -1314,6 +1338,7 @@ class XCAlert : public XCBase
//
return result;
}
// #endregion
//
// Protected ...
@@ -1380,7 +1405,8 @@ class XCAlert : public XCBase
}
//
string filePath = collector.GetFilePath("XLogs");
string fileName = mPrefix + "." + "XLogs";
string filePath = collector.GetFilePath(fileName);
if (!IsValid(filePath))
{
return;