diff options
Diffstat (limited to 'apps/files/src/logger.js')
-rw-r--r-- | apps/files/src/logger.js | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/apps/files/src/logger.js b/apps/files/src/logger.js index 0005ee13cb4..39283bd331d 100644 --- a/apps/files/src/logger.js +++ b/apps/files/src/logger.js @@ -1,8 +1,7 @@ /** - * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com> * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author John Molakvoæ <skjnldsv@protonmail.com> * * @license AGPL-3.0-or-later * @@ -20,20 +19,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - -import { getCurrentUser } from '@nextcloud/auth' import { getLoggerBuilder } from '@nextcloud/logger' -const getLogger = user => { - if (user === null) { - return getLoggerBuilder() - .setApp('files') - .build() - } - return getLoggerBuilder() - .setApp('files') - .setUid(user.uid) - .build() -} - -export default getLogger(getCurrentUser()) +export default getLoggerBuilder() + .setApp('files') + .detectUser() + .build() |