MemoryBackend is a simple memory based logging backend that will not produce any output but merly keep records, up to the given size, in memory.
| 47 | // MemoryBackend is a simple memory based logging backend that will not produce |
| 48 | // any output but merly keep records, up to the given size, in memory. |
| 49 | type MemoryBackend struct { |
| 50 | size int32 |
| 51 | maxSize int32 |
| 52 | head, tail unsafe.Pointer |
| 53 | } |
| 54 | |
| 55 | // NewMemoryBackend creates a simple in-memory logging backend. |
| 56 | func NewMemoryBackend(size int) *MemoryBackend { |
nothing calls this directly
no outgoing calls
no test coverage detected