[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]

 

     NOCOL Environment Variable

This might be useful for some of you, so I thought I'd post it here; just
another user-friendly configuration option you can stick in your .cshrc.
This will set the default severity to a different level if you have
your NOCOL_DEFAULT_SEVERITY environment variable set.  

Throw this in netconsole.c right after the default severity is set (around
line 107)...

   (char) *levelenv = getenv("NOCOL_DEFAULT_SEVERITY");

    if (*levelenv != NULL) {
      if (strcmp("CRITICAL", *levelenv) == 0) level = E_CRITICAL;
      if (strcmp("ERROR", *levelenv) == 0) level = E_ERROR;
      if (strcmp("WARNING", *levelenv) == 0) level = E_WARNING;
      if (strcmp("INFO", *levelenv) == 0) level = E_INFO;
    }

you'll also need to define 'char *levelenv[15]' in netconsole.h somewhere.


Thank you,

Jonathan A. Zdziarski
Senior Systems Administrator
Netrail, Inc.
888.NET.RAIL x242