Files
NazaraEngine/include/Nazara/Core/Log.hpp
Lynix b243d15c74 Added formats conversion
Functor, NonCopyable, Tuple are now parts of NazaraCore (NazaraCore no
longer needs NazaraUtility)
Added loadFormat image parameter (ask loader to load image in specific
format)
Fixed utility project building
It is now possible to convert, get validity or get name of pixel formats
Changed endianness macros' name
Removed useless NazaraEndianness macro
Removed unused files
2012-05-24 18:55:48 +02:00

56 lines
1.1 KiB
C++

// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine".
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_LOG_HPP
#define NAZARA_LOG_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp>
#define NAZARA_CLASS_LOG
#include <Nazara/Core/ThreadSafety.hpp>
#define NazaraLog NzLog::Instance()
class NzFile;
class NAZARA_API NzLog : NzNonCopyable
{
public:
void Enable(bool enable);
void EnableAppend(bool enable);
void EnableDateTime(bool enable);
NzString GetFile() const;
bool IsEnabled() const;
void SetFile(const NzString& filePath);
void Write(const NzString& string);
void WriteError(nzErrorType type, const NzString& error, unsigned int line, const NzString& file, const NzString& func);
static NzLog* Instance();
private:
NzLog();
~NzLog();
NazaraMutexAttrib(m_mutex, mutable)
NzString m_filePath;
NzFile* m_file;
bool m_append;
bool m_enabled;
bool m_writeTime;
};
#undef NAZARA_CLASS_LOG
#endif // NAZARA_LOGGER_HPP