Peano
Loading...
Searching...
No Matches
NoLogger.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#ifdef Parallel
6#include <mpi.h>
7#endif
8
9#include <iostream>
10#include <fstream>
11#include <set>
12#include <stack>
13
16#include "tarch/logging/Log.h"
17
18namespace tarch {
19 namespace logging {
20 class NoLogger;
21 }
22}
23
49 private:
50 static Log _log;
51
53
55
57
62 NoLogger& operator=(const NoLogger&) = delete;
63
68 NoLogger(const NoLogger&) = delete;
69
74
76 std::string messageType,
77 long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message
78 );
79 public:
80 ~NoLogger() = default;
81
83
87 void debug( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message);
88
89 void info( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message);
90
100 void warning( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message);
101
111 void error( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message);
112
116 void traceIn( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message) {}
117
121 void traceOut( long int timestampNanoseconds, int rank, int threadId, const std::string& trace, const std::string& message) {}
122
126 void indent( bool indent, const std::string& trace ) {}
127
128 void setQuitOnError(bool value);
129};
Log Device.
Definition Log.h:517
Command Line Logger.
Definition NoLogger.h:48
void error(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Write Error.
void setQuitOnError(bool value)
NoLogger & operator=(const NoLogger &)=delete
Declared private since assignment does not make sense for an output class (output information mismatc...
void indent(bool indent, const std::string &trace)
Nop.
Definition NoLogger.h:126
void warning(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Write Warning.
void traceIn(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Nop.
Definition NoLogger.h:116
void traceOut(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Nop.
Definition NoLogger.h:121
NoLogger()
It's a singleton.
void info(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
static NoLogger _singleton
Definition NoLogger.h:52
void debug(long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
Nop.
static NoLogger & getInstance()
std::string constructMessageString(std::string messageType, long int timestampNanoseconds, int rank, int threadId, const std::string &trace, const std::string &message)
tarch::multicore::BooleanSemaphore _semaphore
Definition NoLogger.h:54
NoLogger(const NoLogger &)=delete
Declared private since copying does not make sense for an output class (output information mismatch).
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19