Skip to content

Commit

Permalink
Flush SSE Logging data after every \n
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed May 9, 2022
1 parent ec0961d commit 8454d03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions LogStreamMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ size_t LogStreamMulti::write(const uint8_t *buffer, size_t size) {
}
memcpy(&_buffer[_getBufferPosition()], buffer+position, size-position);

for (uint8_t i=position; i<size-position; i++) {
if (_buffer[i] == '\n') {
flush();
break;
}
}

size_t result = 0; //TODO
return size;
}
Expand Down

0 comments on commit 8454d03

Please sign in to comment.