Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "log"
  5. "log/syslog"
  6. "fmt"
  7. "strconv"
  8. "strings"
  9. )
  10.  
  11. type logWriter struct {
  12. }
  13.  
  14. func (writer logWriter) Write(input string) (string) {
  15. var lines string
  16. for _, line := range strings.Split(input, "\n") {
  17. lines += " __test__ " + string(line) + "\n"
  18. }
  19. return lines
  20. }
  21.  
  22.  
  23. func main() {
  24. con, err := syslog.Dial("tcp", "logs.xxx:514", syslog.LOG_INFO, "gologs-generator")
  25. if err != nil {
  26. log.Fatal(err)
  27. }
  28.  
  29. s := `
  30. test messages
  31. “The one thing which is of moment to Marx, is to find the law of the phenomena
  32. with whose investigation he is concerned; and not only is that law of moment to
  33. him, which governs these phenomena, in so far as they have a definite form and
  34. mutual connexion within a given historical period. Of still greater moment to him
  35. is the law of their variation, of their development, i.e., of their transition from one
  36. form into another, from one series of connexions into a different one. This law
  37. once discovered, he investigates in detail the effects in which it manifests itself in
  38. social life. Consequently, Marx only troubles himself about one thing: to show, by
  39. rigid scientific investigation, the necessity of successive determinate orders of
  40. social conditions, and to establish, as impartially as possible, the facts that serve
  41. him for fundamental starting-points. For this it is quite enough, if he proves, at the
  42. same time, both the necessity of the present order of things, and the necessity of
  43. another order into which the first must inevitably pass over; and this all the same,
  44. whether men believe or do not believe it, whether they are conscious or
  45. unconscious of it. Marx treats the social movement as a process of natural history,
  46. governed by laws not only independent of human will, consciousness and
  47. intelligence, but rather, on the contrary, determining that will, consciousness and
  48. intelligence. ... If in the history of civilisation the conscious element plays a part
  49. so subordinate, then it is self-evident that a critical inquiry whose subject-matter is
  50. civilisation, can, less than anything else, have for its basis any form of, or any
  51. result of, consciousness. That is to say, that not the idea, but the material
  52. phenomenon alone can serve as its starting-point. Such an inquiry will confine
  53. itself to the confrontation and the comparison of a fact, not with ideas, but with
  54. another fact. For this inquiry, the one thing of moment is, that both facts be
  55. investigated as accurately as possible, and that they actually form, each with
  56. respect to the other, different momenta of an evolution; but most important of all
  57. is the rigid analysis of the series of successions, of the sequences and
  58. concatenations in which the different stages of such an evolution present
  59. 14 Afterword to the Second German Edition (1873)
  60. themselves. But it will be said, the general laws of economic life are one and the
  61. same, no matter whether they are applied to the present or the past. This Marx
  62. directly denies. According to him, such abstract laws do not exist. On the
  63. contrary, in his opinion every historical period has laws of its own. ... As soon as
  64. society has outlived a given period of development, and is passing over from one
  65. given stage to another, it begins to be subject also to other laws. In a word,
  66. economic life offers us a phenomenon analogous to the history of evolution in
  67. other branches of biology. The old economists misunderstood the nature of
  68. economic laws when they likened them to the laws of physics and chemistry. A
  69. more thorough analysis of phenomena shows that social organisms differ among
  70. themselves as fundamentally as plants or animals. Nay, one and the same
  71. phenomenon falls under quite different laws in consequence of the different
  72. structure of those organisms as a whole, of the variations of their individual
  73. organs, of the different conditions in which those organs function, &c. Marx, e.g.,
  74. denies that the law of population is the same at all times and in all places. He
  75. asserts, on the contrary, that every stage of development has its own law of
  76. population. ... With the varying degree of development of productive power,
  77. social conditions and the laws governing them vary too. Whilst Marx sets himself
  78. the task of following and explaining from this point of view the economic system
  79. established by the sway of capital, he is only formulating, in a strictly scientific
  80. manner, the aim that every accurate investigation into economic life must have.
  81. The scientific value of such an inquiry lies in the disclosing of the special laws
  82. that regulate the origin, existence, development, death of a given social organism
  83. and its replacement by another and higher one. And it is this value that, in point of
  84. fact, Marx’s book has.”`
  85.  
  86. k := 0
  87. for {
  88. str := strconv.Itoa(k)
  89. str = str + " " + s
  90. a := logWriter{}
  91. b := a.Write(str)
  92. fmt.Fprintf(con, string(b))
  93. k = k+ 1
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement