mirror of https://github.com/KLayout/klayout.git
Fixing issue #1971: providing log levels -10 to disable warnings and -20 to disable errors too.
This commit is contained in:
parent
07da5a3cf2
commit
a75eca5511
|
|
@ -392,28 +392,35 @@ WarningChannel::~WarningChannel ()
|
||||||
void
|
void
|
||||||
WarningChannel::puts (const char *s)
|
WarningChannel::puts (const char *s)
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= 0) {
|
||||||
fputs (s, stdout);
|
fputs (s, stdout);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WarningChannel::endl ()
|
WarningChannel::endl ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= 0) {
|
||||||
fputs ("\n", stdout);
|
fputs ("\n", stdout);
|
||||||
m_new_line = true;
|
m_new_line = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WarningChannel::end ()
|
WarningChannel::end ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= 0) {
|
||||||
if (m_colorized) {
|
if (m_colorized) {
|
||||||
fputs (ANSI_RESET, stdout);
|
fputs (ANSI_RESET, stdout);
|
||||||
}
|
}
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WarningChannel::begin ()
|
WarningChannel::begin ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= 0) {
|
||||||
if (m_colorized) {
|
if (m_colorized) {
|
||||||
fputs (ANSI_BLUE, stdout);
|
fputs (ANSI_BLUE, stdout);
|
||||||
}
|
}
|
||||||
|
|
@ -422,6 +429,7 @@ WarningChannel::begin ()
|
||||||
m_new_line = false;
|
m_new_line = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
@ -463,28 +471,35 @@ ErrorChannel::~ErrorChannel ()
|
||||||
void
|
void
|
||||||
ErrorChannel::puts (const char *s)
|
ErrorChannel::puts (const char *s)
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= -10) {
|
||||||
fputs (s, stderr);
|
fputs (s, stderr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ErrorChannel::endl ()
|
ErrorChannel::endl ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= -10) {
|
||||||
fputs ("\n", stderr);
|
fputs ("\n", stderr);
|
||||||
m_new_line = true;
|
m_new_line = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ErrorChannel::end ()
|
ErrorChannel::end ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= -10) {
|
||||||
if (m_colorized) {
|
if (m_colorized) {
|
||||||
fputs (ANSI_RESET, stderr);
|
fputs (ANSI_RESET, stderr);
|
||||||
}
|
}
|
||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ErrorChannel::begin ()
|
ErrorChannel::begin ()
|
||||||
{
|
{
|
||||||
|
if (verbosity () >= -10) {
|
||||||
if (m_colorized) {
|
if (m_colorized) {
|
||||||
fputs (ANSI_RED, stderr);
|
fputs (ANSI_RED, stderr);
|
||||||
}
|
}
|
||||||
|
|
@ -493,6 +508,7 @@ ErrorChannel::begin ()
|
||||||
m_new_line = false;
|
m_new_line = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
// The instances of the log channels
|
// The instances of the log channels
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue