Menu

slog

2000-03-22
2000-05-23
  • David Sugar

    David Sugar - 2000-03-22

    This is not a future as it was just put into cvs.  However, what it provides is a Common C++ interface to the Unix syslog facility.  The intended usage of slog is meant to be very similar to "clog"; a default
    slog object is pre-initialized, and you stream character data to it.

    The new "slog" allows one to specify logging levels and other properties through the () operators.  Hence, once can do:

    slog("mydaemon", SLOG_DAEMON, SLOG_EMERGENCY) << I just died << endl;

    or things like:

    slog("mydaemon", SLOG_DAEMON);
    slog(SLOG_INFO) << "daemon initalized" << endl;

    The intent is to be as common-place and as convenient to use as the stderr based clog facility found in C++, and this is especially useful for C++ daemons.

     
    • August Zajonc

      August Zajonc - 2000-05-20

      What about moding this so one can create log files on other platforms such as Win32. Mailslots perhaps? I've grown to use syslog on a FreeBSD system quite heavily, and would love to be able to do error reporting the right way through slog across platforms...

      AZ

       
      • David Sugar

        David Sugar - 2000-05-23

        On most UNIX platforms, slog uses the "syslog" facility directly.  On win32
        I am not sure what would be best to do, and there is no "slog" there yet.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.