mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 19:49:19 +02:00
Wyłączenie okienek pop-up. W zamian zapis do logów.
Wyłączenie okienek pop-up. W zamian zapis do logów.
This commit is contained in:
27
Logs.cpp
27
Logs.cpp
@@ -7,16 +7,16 @@ obtain one at
|
|||||||
http://mozilla.org/MPL/2.0/.
|
http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.hpp"
|
|
||||||
#include "classes.hpp"
|
#include "classes.hpp"
|
||||||
|
#include "system.hpp"
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|
||||||
#include "Logs.h"
|
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
|
#include "Logs.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
std::ofstream output; // standardowy "log.txt", mo¿na go wy³¹czyæ
|
std::ofstream output; // standardowy "log.txt", mo¿na go wy³¹czyæ
|
||||||
std::ofstream errors; // lista b³êdów "errors.txt", zawsze dzia³a
|
std::ofstream errors; // lista b³êdów "errors.txt", zawsze dzia³a
|
||||||
@@ -91,22 +91,23 @@ void ErrorLog(const char *str)
|
|||||||
|
|
||||||
void Error(const AnsiString &asMessage, bool box)
|
void Error(const AnsiString &asMessage, bool box)
|
||||||
{
|
{
|
||||||
if (box)
|
// if (box)
|
||||||
MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
// MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
||||||
WriteLog(asMessage.c_str());
|
ErrorLog(asMessage.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Error(const std::string &asMessage, bool box)
|
void Error(const std::string &asMessage, bool box)
|
||||||
{
|
{
|
||||||
if (box)
|
// if (box)
|
||||||
MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
// MessageBox(NULL, asMessage.c_str(), string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
||||||
WriteLog(asMessage.c_str());
|
ErrorLog(asMessage.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Error(const char* &asMessage, bool box)
|
void Error(const char *&asMessage, bool box)
|
||||||
{
|
{
|
||||||
if (box)
|
// if (box)
|
||||||
MessageBox(NULL, asMessage, string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
// MessageBox(NULL, asMessage, string("EU07 " + Global::asRelease).c_str(), MB_OK);
|
||||||
|
ErrorLog(asMessage);
|
||||||
WriteLog(asMessage);
|
WriteLog(asMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
Logs.h
6
Logs.h
@@ -16,9 +16,9 @@ void WriteConsoleOnly(const char *str, double value);
|
|||||||
void WriteConsoleOnly(const char *str, bool newline = true);
|
void WriteConsoleOnly(const char *str, bool newline = true);
|
||||||
void WriteLog(const char *str, double value);
|
void WriteLog(const char *str, double value);
|
||||||
void WriteLog(const char *str, bool newline = true);
|
void WriteLog(const char *str, bool newline = true);
|
||||||
void Error(const AnsiString &asMessage, bool box = true);
|
void Error(const AnsiString &asMessage, bool box = false);
|
||||||
void Error(const std::string &asMessage, bool box = true);
|
void Error(const std::string &asMessage, bool box = false);
|
||||||
void Error(const char* &asMessage, bool box = true);
|
void Error(const char* &asMessage, bool box = false);
|
||||||
void ErrorLog(const std::string &str, bool newline = true);
|
void ErrorLog(const std::string &str, bool newline = true);
|
||||||
//void ErrorLog(const AnsiString &asMessage);
|
//void ErrorLog(const AnsiString &asMessage);
|
||||||
void WriteLog(const AnsiString &str, bool newline = true);
|
void WriteLog(const AnsiString &str, bool newline = true);
|
||||||
|
|||||||
Reference in New Issue
Block a user