Derrick
0d39f28f6e
Fix infinite loop in log writer.
...
The log writter would end up calling itself non-stop. This instead tells
the logtarget.Write function to call the MultiWriter's Write instead of
itself.
2020-04-11 21:09:35 -07:00
Ola Bini
8b2c7901ee
Use MultiWriter to simplify the writing implementation. Also make it possible to initialize the log target to variable amounts of writers, and doesn't hardcode the use of StdErr as output
2020-03-26 14:20:13 +00:00
Ola Bini
d6c4d9f766
Remove unused field
2020-03-26 14:10:33 +00:00
Ola Bini
9c082d3516
Make OpenFile a factory function instead of a method on LogTarget. Use this to initialize the default logging target
2020-03-26 14:09:03 +00:00
Ola Bini
dd6f383d3e
Rename the default logtarget to not stutter. Also hide the default file log target implementation
2020-03-26 14:04:14 +00:00
Ola Bini
8d351aedb0
Extract a LogTarget interface to make it easier to manage logging
2020-03-26 14:00:01 +00:00
Tim Cooper
20eba760e5
go fmt
2016-03-25 22:05:23 -03:00
Mikkel Krautz
e46a65109f
Update for Go 1.
2012-02-06 22:17:42 +01:00
Mikkel Krautz
ede1c7735e
Add panic to logtarget when a consumer hasn't called OpenFile to open the main log file.
2011-11-10 12:47:32 +01:00
Mikkel Krautz
f47840f8fc
Output all LogTarget writes to Stderr as well (for now).
2011-11-10 12:26:19 +01:00
Mikkel Krautz
79e5ffbd4d
Move logtarget to its own package.
2011-11-10 12:18:53 +01:00