Skip to content

Commit a5ae5ef

Browse files
committed
complete chapter 04.5-rolling-file-support
1 parent 4a13890 commit a5ae5ef

File tree

3 files changed

+519
-0
lines changed

3 files changed

+519
-0
lines changed

Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ I highly recommend coding along with this guide rather than just reading it.
124124
- [Faster I/O out of the box](/chapters/ch04.4-intro-to-async-vs-sync.md#faster-io-out-of-the-box)
125125
- [Blocking Code](/chapters/ch04.4-intro-to-async-vs-sync.md#blocking-code)
126126
- [Concurrency](/chapters/ch04.4-intro-to-async-vs-sync.md#concurrency)
127+
- [Adding Rolling File Support](/chapters/ch04.5-rolling-file-support.md)
128+
- [Rolling features](/chapters/ch04.5-rolling-file-support.md#rolling-features)
129+
- [`#time_threshold`](/chapters/ch04.5-rolling-file-support.md#timethreshold)
130+
- [`#size_threshold`](/chapters/ch04.5-rolling-file-support.md#sizethreshold)
131+
- [The `rolling_check()` method](/chapters/ch04.5-rolling-file-support.md#the-rolling_check-method)
132+
- [`file_handle.stat()`](/chapters/ch04.5-rolling-file-support.md#file_handlestat)
133+
- [Calling the `rolling_check` method](/chapters/ch04.5-rolling-file-support.md#calling-the-rolling_check-method)
134+
- [A big gotcha!](/chapters/ch04.5-rolling-file-support.md#a-big-gotcha)
135+
- [Stack traces across `await` points](/chapters/ch04.5-rolling-file-support.md#stack-traces-across-await-points)
136+
- [The culprit](/chapters/ch04.5-rolling-file-support.md#the-culprit)
137+
- [Testing the new Log file creation](/chapters/ch04.5-rolling-file-support.md#testing-the-new-log-file-creation)
138+
127139

128140

129141
![](https://uddrapi.com/api/img?page=readme)

chapters/ch04.4-intro-to-async-vs-sync.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,6 @@ To address this issue, Node.js uses an event-driven, non-blocking I/O model. Thi
7777

7878
For example, suppose an average request for an API endpoint takes 60ms. Within that 60ms, 30ms are spent reading from a database, and 25ms are spent reading from a file. If this process were synchronous, our web server would be incapable of handling a large number of concurrent requests. However, Node.js solves this problem with its non-blocking model. If you use the asynchronous version of the file/database API, the operation will continue to serve other requests whenever it needs to wait for the database or file.
7979

80+
[![Read Next](/assets/imgs/next.png)](/chapters/ch04.5-rolling-file-support.md)
81+
8082
![](https://uddrapi.com/api/img?page=ch04.4)

0 commit comments

Comments
 (0)