Ananas Library 0.9.5
alog.h
1/****************************************************************************
2** $Id: alog.h,v 1.9 2007/06/02 07:07:08 app Exp $
3**
4** Log functions header file of
5** Ananas application library
6**
7** Created : 20051024
8**
9** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola.
10**
11** This file is part of the Designer application of the Ananas
12** automation accounting system.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21**
22** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
23** See http://www.leaderit.ru/gpl/ for GPL licensing information.
24**
25** Contact org@leaderit.ru if any conditions of this licensing are
26** not clear to you.
27**
28**********************************************************************/
29
30#ifndef ALOG_H
31#define ALOG_H
32
33//#include "ananas.h"
34#include "ananasglobal.h"
35#include <qstring.h>
36#include <qfile.h>
37
38
39// for bcc32.exe compatibility
40// in file wingdi.h
41// #define ERROR 0
42
43//#ifdef Q_OS_WIN32
44//#define ERROR IRROR
45//#endif
46
54class ANANAS_EXPORT aLog
55{
56 public:
57 enum MessageType { MT_ERROR, MT_INFO, MT_DEBUG };
58// enum status {
64/*
65#ifdef Q_OS_WIN32
66 static const int IRROR;//,
67#else
68 static const int ERROR;
69#endif
70*/
75// static const int INFO;//,
81// static const int DEBUG;// };
82
83 static void print( int status, const QString &text);
84 static void printr( const QString &text);
85 static void init( const QString &logname="", int loglevel=0);
86 static void close();
87 static QString getLogName();
88
89
90 private:
91 aLog();
92 static QString logName;
93 static int logLevel;
94 static QFile f;
95 static bool msg_was_show;
96
97};
98#endif// ALOG_H
static void print(int status, const QString &text)
Definition alog.cpp:58
static void printr(const QString &text)
Definition alog.cpp:101
static void init(const QString &logname="", int loglevel=0)
Definition alog.cpp:129