logger_windows.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // +build windows
  2. // Wrapper around UNIX syslog, so that it also may be wrapped
  3. // with something else for Windows.
  4. package logger
  5. import (
  6. "os"
  7. )
  8. type Priority = int
  9. type Writer = os.File
  10. const (
  11. // Severity.
  12. // From /usr/include/sys/syslog.h.
  13. // These are the same on Linux, BSD, and OS X.
  14. LOG_EMERG Priority = iota
  15. LOG_ALERT
  16. LOG_CRIT
  17. LOG_ERR
  18. LOG_WARNING
  19. LOG_NOTICE
  20. LOG_INFO
  21. LOG_DEBUG
  22. )
  23. const (
  24. // Facility.
  25. // From /usr/include/sys/syslog.h.
  26. // These are the same up to LOG_FTP on Linux, BSD, and OS X.
  27. LOG_KERN Priority = iota << 3
  28. LOG_USER
  29. LOG_MAIL
  30. LOG_DAEMON
  31. LOG_AUTH
  32. LOG_SYSLOG
  33. LOG_LPR
  34. LOG_NEWS
  35. LOG_UUCP
  36. LOG_CRON
  37. LOG_AUTHPRIV
  38. LOG_FTP
  39. _ // unused
  40. _ // unused
  41. _ // unused
  42. _ // unused
  43. LOG_LOCAL0
  44. LOG_LOCAL1
  45. LOG_LOCAL2
  46. LOG_LOCAL3
  47. LOG_LOCAL4
  48. LOG_LOCAL5
  49. LOG_LOCAL6
  50. LOG_LOCAL7
  51. )
  52. func New(flags Priority, tag string) (w *Writer, e error) {
  53. return os.Stderr, nil
  54. }
  55. func Alert(s string) error {
  56. return nil
  57. }
  58. func LogClose() error {
  59. return nil
  60. }
  61. func LogCrit(s string) error {
  62. return nil
  63. }
  64. func LogDebug(s string) error {
  65. return nil
  66. }
  67. func LogEmerg(s string) error {
  68. return nil
  69. }
  70. func LogErr(s string) error {
  71. return nil
  72. }
  73. func LogInfo(s string) error {
  74. return nil
  75. }
  76. func LogNotice(s string) error {
  77. return nil
  78. }
  79. func LogWarning(s string) error {
  80. return nil
  81. }
  82. func LogWrite(b []byte) (int, error) {
  83. return len(b), nil
  84. }