winRT/LogImpl.h
Go to the documentation of this file.
//-----------------------------------------------------------------------------
//
// LogImpl.h
//
// WinRT implementation of message and error logging
//
// Copyright (c) 2015 Microsoft Corporation
// All rights reserved.
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef _LogImpl_H
#define _LogImpl_H
#include "Defs.h"
#include <string>
#include "platform/Log.h"
#include "Windows.h"
namespace OpenZWave
{
class LogImpl : public i_LogImpl
{
private:
friend class Log;
LogImpl( string const& _filename, bool const _bAppendLog, bool const _bConsoleOutput, LogLevel const _saveLevel, LogLevel const _queueLevel, LogLevel const _dumpTrigger );
~LogImpl();
void Write( LogLevel _level, uint8 const _nodeId, char const* _format, va_list _args );
void Queue( char const* _buffer );
void QueueDump();
void QueueClear();
void SetLoggingState( LogLevel _saveLevel, LogLevel _queueLevel, LogLevel _dumpTrigger );
void SetLogFileName( const string &_filename );
string GetTimeStampString();
string GetNodeString( uint8 const _nodeId );
string GetThreadId();
string GetLogLevelString(LogLevel _level);
string m_filename;
bool m_bConsoleOutput;
bool m_bAppendLog;
list<string> m_logQueue;
LogLevel m_saveLevel;
LogLevel m_queueLevel;
LogLevel m_dumpTrigger;
};
} // namespace OpenZWave
#endif //_LogImpl_H
OpenZWave::LogLevel
LogLevel
Definition: Log.h:41
OpenZWave
Definition: Bitfield.h:34
OpenZWave::LogImpl::Log
friend class Log
Definition: windows/LogImpl.h:43
Log.h
Defs.h
uint8
unsigned char uint8
Definition: Defs.h:74