Skip to content

Commit 331504d

Browse files
committed
fix: disable log checking logic on log disabled
1 parent 554cbaf commit 331504d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@thecodeorigin/nuxt",
33
"type": "module",
4-
"version": "2.7.2",
4+
"version": "2.7.3",
55
"publishConfig": {
66
"registry": "https://registry.npmjs.org",
77
"access": "public"

server/utils/logger.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export class Logger {
3636

3737
constructor(logsDirOpt?: string) {
3838
this.logsDir = logsDirOpt || join(process.cwd(), 'logs')
39-
this.ensureLogDirectoryExistsSync()
4039
this.initS3Config()
41-
this.initLogLevels()
4240

4341
const winstonLogLevel = this.determineWinstonLogLevel()
4442

@@ -173,6 +171,8 @@ export class Logger {
173171
region,
174172
credentials: { accessKeyId, secretAccessKey },
175173
})
174+
this.ensureLogDirectoryExistsSync()
175+
this.initLogLevels()
176176
console.info(`Logger: S3 uploads enabled to bucket ${bucket} in region ${region}.`)
177177
}
178178
else {

0 commit comments

Comments
 (0)