issues
search
marcin-waszak
/
DistributedProcesses
Distributed processes management system
GNU General Public License v3.0
0
stars
0
forks
source link
Add static Log class and debug mode switch
#19
Open
marcin-waszak
opened
7 years ago
marcin-waszak
commented
7 years ago
Add static Log class with methods Log::Info(), Log::Error(), Log::Out(). Class should contain debug flag.
Add debug switch for printing only Log::Out(), in other case print all Log::Info(), Log::Error(), Log::Out().
Class should be placed in common directory.
Tips:
Log::Error should use stderr
use for example printf syntax, eg. Log::Error("Bad value: %d, expected %d", a, b),
use std::forward to forward whole printf-like arguments onto fprintf() insted of oldfashion va_start() etc...,
use fprintf(),
use fflush(stdout) when after printing stdout.
Tips: