Skip to content

Commit

Permalink
Merge pull request #362 from susnux/master
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Jul 7, 2022
2 parents 6915731 + 28945de commit c2ab5d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 2.x.y - tbd
### Changed
- More robust agains library loading order problems

## 2.2.0 – 2022-06-27
### Added
- Respect server log level and debug mode settings
Expand Down
4 changes: 2 additions & 2 deletions lib/LoggerBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class LoggerBuilder {
this.context = {}
this.factory = factory
// Up to, including, nextcloud 24 the loglevel was not exposed
this.context.level = OC.config?.loglevel !== undefined ? OC.config.loglevel : LogLevel.Warn
this.context.level = OC?.config?.loglevel !== undefined ? OC.config.loglevel : LogLevel.Warn
// Override loglevel if we are in debug mode
if (OC.debug) {
if (OC?.debug) {
this.context.level = LogLevel.Debug
}
}
Expand Down

0 comments on commit c2ab5d4

Please sign in to comment.