1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 VideoLAN
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
8 * Olivier Teulière <ipkiss@via.ecp.fr>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
28 #include "skin_common.hpp"
33 #define MSG_ERR( msg ) Logger::instance( getIntf() )->error( msg )
34 #define MSG_WARN( msg ) Logger::instance( getIntf() )->warn( msg )
38 class Logger: public SkinObject
41 /// Get the instance of Logger
42 /// Returns NULL if initialization failed
43 static Logger *instance( intf_thread_t *pIntf );
45 /// Delete the instance of Logger
46 static void destroy( intf_thread_t *pIntf );
48 /// Print an error message
49 void error( const string &rMsg );
52 void warn( const string &rMsg );
55 // Private because it's a singleton
56 Logger( intf_thread_t *pIntf );