home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / OpenTransport / Open Tpt Module Developer / Includes / strlog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-24  |  1.2 KB  |  67 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        strlog.h
  3.  
  4.     Copyright:    © 1993-1996 by Mentat Inc., all rights reserved.
  5.  
  6. */
  7.  
  8. #ifndef __STRLOG__
  9. #define __STRLOG__
  10.  
  11. #ifndef __OPENTRANSPORT__
  12. #include <OpenTransport.h>
  13. #endif
  14.  
  15. #if PRAGMA_ALIGN_SUPPORTED
  16. #pragma options align=mac68k
  17. #endif
  18.  
  19. struct log_ctl {
  20.     short    mid;
  21.     short    sid;
  22.     char    level;
  23.     short    flags;
  24.     long    ltime;
  25.     long    ttime;
  26.     int_t    seq_no;
  27. };
  28.  
  29. #define    SL_FATAL    0x1    /* Fatal error */
  30. #define    SL_NOTIFY    0x2    /* Notify the system administrator */
  31. #define    SL_ERROR    0x4    /* Pass message to error logger */
  32. #define    SL_TRACE    0x8    /* Pass message to tracer */
  33. #define    SL_CONSOLE    0x10    /* Print the message on the console */
  34. #define    SL_WARN        0x20    /* Warning */
  35. #define    SL_NOTE        0x40    /* Notice this message */
  36.  
  37. struct trace_ids {
  38.     short    ti_mid;
  39.     short    ti_sid;
  40.     char    ti_level;
  41. };
  42.  
  43. #ifndef MIOC_CMD
  44. #include <miioccom.h>
  45. #endif    /* MIOC_CMD */
  46.  
  47. #define    I_TRCLOG    MIOC_CMD(MIOC_STRLOG, 1)
  48. #define    I_ERRLOG    MIOC_CMD(MIOC_STRLOG, 2)
  49.  
  50. #define    LOGMSGSZ    128
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. extern    int_t    strlog( int_t mid, int_t sid, int_t level, uint_t flags, char* fmt, ...);
  57.  
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61.  
  62. #if PRAGMA_ALIGN_SUPPORTED
  63. #pragma options align=reset
  64. #endif
  65.  
  66. #endif    /* _STRLOG_ */
  67.