You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					24 lines
				
				465 B
			
		
		
			
		
	
	
					24 lines
				
				465 B
			| 
								 
											3 years ago
										 
									 | 
							
								#ifndef LOGGER_H
							 | 
						||
| 
								 | 
							
								#define LOGGER_H
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <QDebug>
							 | 
						||
| 
								 | 
							
								#include <QFile>
							 | 
						||
| 
								 | 
							
								#include <QHash>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class Logger
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								private:
							 | 
						||
| 
								 | 
							
								    static QFile* _logFile;
							 | 
						||
| 
								 | 
							
								    static QHash<QtMsgType, QString> _logTitles;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								    Logger(QString fileName = "./DefaultHatefLogFile.log");
							 | 
						||
| 
								 | 
							
								    ~Logger();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    static void makeFinishingLine();
							 | 
						||
| 
								 | 
							
								    static void messageOutput(QtMsgType type, const QMessageLogContext& context,
							 | 
						||
| 
								 | 
							
								                              const QString& msg);
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif //LOGGER_H
							 |