forked from flrnull/http-logs-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDebug.cpp
executable file
·25 lines (22 loc) · 1.06 KB
/
Debug.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "Debug.h"
#include <string>
#include <ctime>
#include <iostream>
void Debug::print(std::string string) {
time_t now = time(0);
tm *ltm = localtime(&now);
std::cout << "[" << 1900 + ltm->tm_year << "." << 1 + ltm->tm_mon << "." << ltm->tm_mday << " " << 1 + ltm->tm_hour << ":" << 1 + ltm->tm_min << ":" << 1 + ltm->tm_sec << "]" << " ";
std::cout << string << std::endl;
}
void Debug::print(int number) {
time_t now = time(0);
tm *ltm = localtime(&now);
std::cout << "[" << 1900 + ltm->tm_year << "." << 1 + ltm->tm_mon << "." << ltm->tm_mday << " " << 1 + ltm->tm_hour << ":" << 1 + ltm->tm_min << ":" << 1 + ltm->tm_sec << "]" << " ";
std::cout << number << std::endl;
}
void Debug::print(std::string string, int number) {
time_t now = time(0);
tm *ltm = localtime(&now);
std::cout << "[" << 1900 + ltm->tm_year << "." << 1 + ltm->tm_mon << "." << ltm->tm_mday << " " << 1 + ltm->tm_hour << ":" << 1 + ltm->tm_min << ":" << 1 + ltm->tm_sec << "]" << " ";
std::cout << string << number << std::endl;
}