ctkLogger.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 #ifndef __ctkLogger_h
00022 #define __ctkLogger_h
00023 
00024 // Qt includes 
00025 #include <QObject>
00026 #include <QSqlDatabase>
00027 
00028 // CTK includes
00029 #include "CTKCoreExport.h"
00030 
00031 class CTK_CORE_EXPORT ctkLogger : public QObject
00032 {
00033   Q_OBJECT
00034 public:
00035   typedef QObject Superclass;
00036   explicit ctkLogger ( QString name, QObject* parent = 0 );
00037   virtual ~ctkLogger ();
00038   
00039   void debug ( QString s );
00040   void info ( QString s );
00041   void notice ( QString s );
00042   void warn ( QString s );
00043   void warning ( QString s );
00044   void error ( QString s );
00045   void crit ( QString s );
00046   void critical ( QString s );
00047   void alert ( QString s );
00048   void emerg ( QString s );
00049   void emergercy ( QString s );
00050   void fatal ( QString s );
00051 
00052   void setDebug();
00053   void setInfo();
00054   void setNotice();
00055   void setWarn();
00056   void setWarning();
00057   void setError();
00058   void setCrit();
00059   void setCritical();
00060   void setAlert();
00061   void setEmerg();
00062   void setEmergercy();
00063   void setFatal();
00064 
00065   bool isDebugEnabled();
00066   bool isInfoEnabled();
00067   bool isNoticeEnabled();
00068   bool isWarnEnabled();
00069   bool isWarningEnabled();
00070   bool isErrorEnabled();
00071   bool isCritEnabled();
00072   bool isCriticalEnabled();
00073   bool isAlertEnabled();
00074   bool isEmergEnabled();
00075   bool isEmergercyEnabled();
00076   bool isFatalEnabled();
00077 
00078 private:
00079   class ctkInternal;
00080   ctkInternal *Internal;
00081 };
00082 
00083 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1