BUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. )
  7. go_test(
  8. name = "go_default_test",
  9. srcs = [
  10. "agent_test.go",
  11. "dsn_test.go",
  12. "encode_test.go",
  13. "log_test.go",
  14. "pattern_test.go",
  15. ],
  16. embed = [":go_default_library"],
  17. rundir = ".",
  18. tags = ["automanaged"],
  19. deps = [
  20. "//library/log/internal:go_default_library",
  21. "//library/net/metadata:go_default_library",
  22. "//library/time:go_default_library",
  23. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  24. ],
  25. )
  26. go_library(
  27. name = "go_default_library",
  28. srcs = [
  29. "agent.go",
  30. "doc.go",
  31. "dsn.go",
  32. "file.go",
  33. "handler.go",
  34. "level.go",
  35. "log.go",
  36. "logrus.go",
  37. "pattern.go",
  38. "stdout.go",
  39. "util.go",
  40. "verbose.go",
  41. ],
  42. importpath = "go-common/library/log",
  43. tags = ["automanaged"],
  44. visibility = ["//visibility:public"],
  45. deps = [
  46. "//library/conf/dsn:go_default_library",
  47. "//library/conf/env:go_default_library",
  48. "//library/log/internal:go_default_library",
  49. "//library/log/internal/filewriter:go_default_library",
  50. "//library/net/metadata:go_default_library",
  51. "//library/net/trace:go_default_library",
  52. "//library/stat/prom:go_default_library",
  53. "//library/time:go_default_library",
  54. "//vendor/github.com/pkg/errors:go_default_library",
  55. "//vendor/github.com/sirupsen/logrus:go_default_library",
  56. ],
  57. )
  58. go_test(
  59. name = "go_default_xtest",
  60. srcs = ["example_test.go"],
  61. tags = ["automanaged"],
  62. deps = ["//library/log:go_default_library"],
  63. )
  64. filegroup(
  65. name = "package-srcs",
  66. srcs = glob(["**"]),
  67. tags = ["automanaged"],
  68. visibility = ["//visibility:private"],
  69. )
  70. filegroup(
  71. name = "all-srcs",
  72. srcs = [
  73. ":package-srcs",
  74. "//library/log/anticheat:all-srcs",
  75. "//library/log/benchmark:all-srcs",
  76. "//library/log/infoc:all-srcs",
  77. "//library/log/internal:all-srcs",
  78. ],
  79. tags = ["automanaged"],
  80. visibility = ["//visibility:public"],
  81. )