wxiaoguang 0d54395fb5 Improve logger Pause handling (#24946)
The old EventWriter's Run does: 

```go
for {
    handlePause()
    select {
    case event <- Queue:
         write the log event ...
    }
}
```

So, if an event writer is started before the logger is paused, there is
a chance that the logger isn't paused for the first message.

The new logic is:

```go
for {
    select {
    case event <- Queue:
         handlePause()
         write the log event ...
    }
}
```

Then the event writer can be correctly paused
2023-05-27 22:35:44 +02:00
..
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00
2023-05-21 22:35:11 +00:00