kwave  18.07.70
Logger.h
Go to the documentation of this file.
1 /***************************************************************************
2  Logger.h - Kwave log file handling
3  -------------------
4  begin : Sat May 17 2014
5  copyright : (C) 2014 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KWAVE_LOGGER_H
19 #define KWAVE_LOGGER_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 
25 class QFile;
26 class QObject;
27 class QString;
28 
29 namespace Kwave
30 {
31 
32  class FileContext;
33  class TopWidget;
34 
40  class Logger
41  {
42  public:
43 
44  typedef enum
45  {
46  Debug = 0,
47  Info,
51  } LogLevel;
52 
56  Logger();
57 
59  virtual ~Logger();
60 
69  static bool Q_DECL_EXPORT open(const QString &filename);
70 
79  static void Q_DECL_EXPORT log(const QObject *sender,
80  LogLevel level,
81  const QString &msg);
82 
83  private:
84 
86  static QFile *m_logfile;
87  };
88 }
89 
90 #endif // _KWAVE_LOGGER_H_
91 
92 //***************************************************************************
93 //***************************************************************************
static bool Q_DECL_EXPORT open(const QString &filename)
Definition: Logger.cpp:59
Definition: App.h:33
static QFile * m_logfile
Definition: Logger.h:86
virtual ~Logger()
Definition: Logger.cpp:49
static void Q_DECL_EXPORT log(const QObject *sender, LogLevel level, const QString &msg)
Definition: Logger.cpp:103