Commit graph

17 commits

Author SHA1 Message Date
Sönke Ludwig aca672416c Fix host name conversion code for SyslogLogger.
See vibe-d/vibe.d#2220
2018-11-07 09:41:57 +01:00
Anton Fediushin 7514f1183e Fix logger colours to make it look good on black and white background 2018-06-09 15:54:24 +02:00
Sebastian Wilzbach 6107c1d807 Replace deprecated hexstring with hexString 2018-01-25 08:43:13 +01:00
Sönke Ludwig 9e0b5a7821 Fix access violation in the log module when called from a non-D thread. 2017-09-21 14:09:19 +02:00
Sönke Ludwig 43260cf982
Log the fiber/task ID in the HTML logger. 2017-09-03 14:17:57 +02:00
Sebastian Wilzbach 8f89733a86 Remove all trailing whitespace
sed 's/[ \t]*$//' -i **/*.d
2017-07-03 12:19:27 +02:00
Sönke Ludwig ed9efd9f44 Merge pull request #10 from wilzbach/allow-removal-of-the-default-logger
Allow removal of the default logger
2017-06-22 10:25:20 +02:00
Sönke Ludwig e769a9b1ca Avoid lazy evaluation of log arguments while the loggers are locked. Fixes rejectedsoftware/vibe.d#1717.
The deadlock happened because a function that waits for a worker task to finish was passed to the log functions. Evaluated lazily, it got called while the logger's mutex was locked, meaning that any log call from within that thread would cause a deadlock.

This change also has another, possibly important, implication - arguments are evaluated only once instead of possibly multiple times if multiple loggers are registered. This could very well make a lot of existing (wrong) code more robust (e.g. logInfo("%s", i++)).
2017-03-23 17:55:51 +01:00
Sebastian Wilzbach c80a15321e Allow removal of the default logger 2017-03-22 13:45:32 +01:00
Sönke Ludwig 6f26766c70 Fix the "threadTime" log format to be consistent with "thread". 2017-02-22 17:36:43 +01:00
Sönke Ludwig 93b342bf77 Fix compilation error on Windows. 2017-02-16 10:20:21 +01:00
Sönke Ludwig da2dfa23df Only emit color escape sequences on a Posix terminal. 2016-12-19 21:22:22 +01:00
Sönke Ludwig 2071f30a1c Remove public HTML escaping declarations from log module. 2016-11-02 20:24:41 +01:00
Sönke Ludwig 6bf63c7331 Add optional terminal color support and make the task/thread prefix more concise. 2016-06-17 22:34:50 +02:00
Sönke Ludwig 3b0e4e0452 Big refactoring step.
- Moves a lot of stuff from vibe.core.core to vibe.core.task
- Introduces TaskScheduler to unify the scheduling process
- Refines how tasks are scheduled and processed (can push to the front of the task queue and uses a marker task to keep track of the spot up to which to process)
- Start to add proper support for task interrupts and timeouts by properly cancelling in-flight async operations
- Work on ManualEvent - still not functional for the shared case
- Implement proper IP address parsing in NetworkAddress
2016-06-14 08:01:03 +02:00
Martin Nowak dc9002de0e make splitting of log lines configurable
- it might make sense to have newlines in a log message
  (e.g. when printing a backtrace) and they shouldn't
  be split into multiple log messages, e.g. when using syslog
- the splitting was fixed to work with more than one LF

(cherry picked from commit d14ce3dea1b98227dcd116acc6b175c56d9a1fb0)
2016-04-10 14:40:38 +02:00
Sönke Ludwig 7e2d1dd038 Initial commit.
The library is able to support simple TCP servers in the current state. The API is still mostly compatible with mainline vibe.d, but the driver systen has been replaced by the eventcore library and sockets/files/timers/... are now structs with automatic reference counting instead of GC collected classes. The stream interfaces have been removed for now.
2016-03-01 20:30:42 +01:00