Lines Matching refs:state
2401 }), this.state = {
2403 }, this.options.pattern && (this.state.currentDate = yo(this.options.pattern, mo())), this.filename = this.fileFormatter({
2405 date: this.state.currentDate
2406 }), ["a", "a+", "as", "as+"].includes(this.options.flags) && this._setExistingSizeAndDate(), Do(`constructor: create new file ${this.filename}, state=${JSON.stringify(this.state)}`), this._renewWriteStream()
2412 this.state.currentSize = e.size, this.options.pattern && (this.state.currentDate = yo(this.options.pattern, e.mtime))
2446 Do(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`), this.currentFileStream.write(e, t, (t => {
2447 this.state.currentSize += e.length, n(t)
2457 return this.state.currentDate && this.state.currentDate !== yo(this.options.pattern, mo())
2461 return this.state.currentSize >= this.options.maxSize
2474 for (let t = (this.state.currentDate ? e.filter((e => e.date === this.state.currentDate)) : e).length; t >= 0; t--) {
2476 const e = this.fileFormatter({ date: this.state.currentDate, index: t }),
2477 n = this.fileFormatter({ date: this.state.currentDate, index: t + 1 }),
2481 this.state.currentSize = 0, this.state.currentDate = this.state.currentDate ? yo(this.options.pattern, mo()) : null, Do(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`), this._renewWriteStream(), await new Promise(((e, t) => {
2497 const e = this.fileFormatter({ date: this.state.currentDate, index: 0 }), t = e => {