Commit Graph

14 Commits

Author SHA1 Message Date
Felix Lange c090a77f1c ethlog: simplify LogSystem interface
Messages are formatted by generic part, so the log system doesn't need
to provide formatting. This fixes the test from the previous commit.

As a small bonus, log systems now have access to the level of
the message. This could be used to provide colored logging in the
future.
2014-10-17 17:23:29 +02:00
Felix Lange 50f5ba5b0c ethlog: add test for '%' in log message
This test fails because the log message is formatted twice.
2014-10-17 17:23:29 +02:00
Felix Lange a6265cb49a ethlog: verify that Flush is blocking in TestLoggerFlush 2014-10-17 17:20:44 +02:00
Felix Lange 793baf060a ethlog: don't buffer output in TestConcurrentAddSystem 2014-10-17 17:20:44 +02:00
Felix Lange ec132749aa ethlog: improve TestLogSystem
It's now safe for concurrent access.
Output checking looks better.
2014-10-17 17:20:44 +02:00
Felix Lange d5a7ba1626 ethlog: add test that adds log systems concurrently 2014-10-17 17:20:44 +02:00
Felix Lange 3b1296077b ethlog: Reset before each test 2014-10-17 17:20:43 +02:00
Felix Lange dac128a029 ethlog: fix test compilation error 2014-10-17 17:20:43 +02:00
zelig 3d5db7288f merge upstream 2014-07-14 18:50:06 +01:00
zelig 5c03adbded fix logger channel blocking 2014-07-14 18:37:01 +01:00
Jeffrey Wilcke 6fe9b4ab5e Revert "ethreact - Feature/ethutil refactor" 2014-07-07 10:59:16 +02:00
zelig d4300c406c logger fix
- introduce quit, drained, shutdown channels
- mainLoop falls through reading message channel to drained state, and waits is blocked in default branch until any message is sent
- Flush() waits for <-drained
- Stop() pushes quit and nodges mainloop out of blocking drained state
- package-global mutex
- Reset()
- clear tests
2014-07-05 19:11:08 +01:00
zelig 853053a3b2 go fmt 2014-06-26 18:45:57 +01:00
zelig 8e9cc36979 refactor logging. Details:
- packages use tagged logger sending log messages to shared (process-wide) logging engine
- log writers (interface ethlog.LogSystem) can be added to the logging engine by wrappers/guis/clients
- shared logging engine dispatching to multiple log systems
- log level can be set separately per log system
- async logging thread: logging IO does not block main thread
- log messages are synchronously stringified to avoid incorrectly logging of changed states
- README.md
- loggers_test
2014-06-23 12:49:04 +01:00