1 #ifndef OSMSCOUT_UTIL_LOGGER_H 2 #define OSMSCOUT_UTIL_LOGGER_H 23 #include <osmscout/CoreFeatures.h> 75 virtual void Print(
const std::string& value) = 0;
80 virtual void Print(
const std::string_view& value) = 0;
85 virtual void Print(
const char* value) = 0;
90 virtual void Print(
bool value) = 0;
91 virtual void Print(
short value) = 0;
92 virtual void Print(
unsigned short value) = 0;
93 virtual void Print(
int value) = 0;
94 virtual void Print(
unsigned int value) = 0;
95 virtual void Print(
long value) = 0;
96 virtual void Print(
unsigned long value) = 0;
97 virtual void Print(
long long value) = 0;
98 virtual void Print(
unsigned long long value) = 0;
104 virtual void PrintLn() = 0;
125 destination.
Print(value);
132 destination.
Print(value);
139 destination.
Print(value);
146 destination.
Print(value);
153 destination.
Print(value);
160 destination.
Print(value);
167 destination.
Print(value);
174 destination.
Print(value);
181 destination.
Print(value);
188 destination.
Print(value);
195 destination.
Print(value);
202 destination.
Print(value);
213 destination.
Print(value.ResultString());
220 destination.
Print(value.AsString());
230 virtual Line
Log(Level level) = 0;
234 virtual ~
Logger() =
default;
272 void Print(
const std::string& )
override 277 void Print(
const std::string_view& )
override 282 void Print(
const char* )
override 287 void Print(
bool )
override 292 void Print(
short )
override 297 void Print(
unsigned short )
override 302 void Print(
int )
override 307 void Print(
unsigned int )
override 312 void Print(
long )
override 317 void Print(
unsigned long )
override 322 void Print(
long long )
override 327 void Print(
unsigned long long )
override 332 void PrintLn()
override 339 NoOpDestination destination;
344 return Line(destination);
365 std::ostream& stream;
368 explicit StreamDestination(std::ostream& stream);
370 void Print(
const std::string& value)
override;
371 void Print(
const std::string_view& value)
override;
372 void Print(
const char* value)
override;
373 void Print(
bool value)
override;
374 void Print(
short value)
override;
375 void Print(
unsigned short value)
override;
376 void Print(
int value)
override;
377 void Print(
unsigned int value)
override;
378 void Print(
long value)
override;
379 void Print(
unsigned long value)
override;
380 void Print(
long long value)
override;
381 void Print(
unsigned long long value)
override;
382 void PrintLn()
override;
386 StreamDestination infoDestination;
387 StreamDestination errorDestination;
391 std::ostream& errorStream);
426 void SetLogger(
Logger* logger);
Line & operator<<(const Distance &value)
Definition: Logger.h:218
Line & operator<<(unsigned int value)
Definition: Logger.h:172
bool IsError() const
Definition: Logger.h:450
bool IsInfo() const
Definition: Logger.h:440
Line & operator<<(const StopClock &value)
Definition: Logger.h:211
Line & operator<<(const char *value)
Definition: Logger.h:137
Log & Info(bool state)
Definition: Logger.h:455
std::ostream & operator<<(std::ostream &stream, const DBId &o)
Definition: DBFileOffset.h:80
Line & operator<<(long value)
Definition: Logger.h:179
Log & Error(bool state)
Definition: Logger.h:469
Line & operator<<(unsigned short value)
Definition: Logger.h:158
Level
Definition: Logger.h:54
Line Log(Level) override
Definition: Logger.h:342
Line & operator<<(bool value)
Definition: Logger.h:144
bool IsWarn() const
Definition: Logger.h:445
Log & Debug(bool state)
Definition: Logger.h:428
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
Line & operator<<(short value)
Definition: Logger.h:151
virtual void Print(const std::string &value)=0
bool IsDebug() const
Definition: Logger.h:435
Line & operator<<(long long value)
Definition: Logger.h:193
Line & operator<<(const std::string_view &value)
Definition: Logger.h:130
Log & Warn(bool state)
Definition: Logger.h:462
Line & operator<<(unsigned long long value)
Definition: Logger.h:200
Line & operator<<(const std::string &value)
Definition: Logger.h:123
Line & operator<<(unsigned long value)
Definition: Logger.h:186
Line & operator<<(int value)
Definition: Logger.h:165