{"id":15136333,"url":"https://github.com/nextcloud-libraries/nextcloud-logger","last_synced_at":"2025-04-13T08:21:45.487Z","repository":{"id":35142724,"uuid":"195257655","full_name":"nextcloud-libraries/nextcloud-logger","owner":"nextcloud-libraries","description":"Generic JavaScript logging interface for Nextcloud apps and libraries https://npmjs.org/@nextcloud/logger","archived":false,"fork":false,"pushed_at":"2024-10-23T01:50:27.000Z","size":3341,"stargazers_count":3,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T20:55:28.160Z","etag":null,"topics":["logger","nextcloud","nextcloud-plugin"],"latest_commit_sha":null,"homepage":"https://nextcloud.github.io/nextcloud-logger/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud-libraries.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-04T14:35:29.000Z","updated_at":"2024-10-23T01:50:33.000Z","dependencies_parsed_at":"2023-07-28T16:25:12.718Z","dependency_job_id":"a1c87cf3-c491-4173-a87d-fc51352085b0","html_url":"https://github.com/nextcloud-libraries/nextcloud-logger","commit_stats":{"total_commits":718,"total_committers":14,"mean_commits":"51.285714285714285","dds":0.4206128133704735,"last_synced_commit":"c014f7eb66af2198fc7dd53736a4c880d6046d17"},"previous_names":["nextcloud-libraries/nextcloud-logger","nextcloud/nextcloud-logger"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Fnextcloud-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Fnextcloud-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Fnextcloud-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud-libraries%2Fnextcloud-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud-libraries","download_url":"https://codeload.github.com/nextcloud-libraries/nextcloud-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245755672,"owners_count":20667027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logger","nextcloud","nextcloud-plugin"],"created_at":"2024-09-26T06:20:56.841Z","updated_at":"2025-03-27T00:10:41.706Z","avatar_url":"https://github.com/nextcloud-libraries.png","language":"TypeScript","readme":"\u003c!--\n  - SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: GPL-3.0-or-later\n--\u003e\n# @nextcloud/logger\n\n[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud-libraries/nextcloud-logger)](https://api.reuse.software/info/github.com/nextcloud-libraries/nextcloud-logger) [![Build Status](https://img.shields.io/github/actions/workflow/status/nextcloud-libraries/nextcloud-logger/node.yml?branch=master)](https://github.com/nextcloud-libraries/nextcloud-logger/actions/workflows/node.yml) [![Code coverage](https://img.shields.io/codecov/c/gh/nextcloud-libraries/nextcloud-logger/master)](https://app.codecov.io/gh/nextcloud-libraries/nextcloud-logger) [![npm](https://img.shields.io/npm/v/@nextcloud/logger.svg)](https://www.npmjs.com/package/@nextcloud/logger)\n[![Documentation](https://img.shields.io/badge/Documentation-online-brightgreen)](https://nextcloud.github.io/nextcloud-logger/)\n\nGeneric JavaScript logging interface for Nextcloud apps and libraries\n\n## Usage\nSee also [API documentation](https://nextcloud-libraries.github.io/nextcloud-logger/).\n\n```js\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nconst logger = getLoggerBuilder()\n    .setApp('mail')\n    .detectUser()\n    .build()\n\nlogger.debug('hello')\nlogger.error('this should not have happened', { someContext: 13 })\nlogger.warn('it\\'s just a warning, carry on')\n```\n\nRight now the package uses `window.console` as log appender and produces the following output\n\n```\n[DEBUG] mail: hello { app: 'mail', uid: 'christoph' }\n[ERROR] mail: this should not have happened { app: 'mail', uid: 'christoph', someContext: 13 }\n[WARN] mail: it's just a warning, carry on { app: 'mail', uid: 'christoph' }\n```\n\nThe logger tries to detect the server configured logging level by default,\nwhich can be configured using the `loglevel_frontend` option in the `config.php`.\nIn case no logging level was configured or detection failed, the logger will fallback to the *warning* level.\n\nIf the server is set to the debug mode the configured logging level will be set to the *debug* level.\n\nAny message with a lower level than the configured will not be printed on the console.\n\nYou can override the logging level in both cases by setting it manually using the `setLogLevel` function\nwhen building the logger.\n\n## Contributing\n\nThis repository is maintained using [conventional commit messages](https://www.conventionalcommits.org/en/v1.0.0/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud-libraries%2Fnextcloud-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud-libraries%2Fnextcloud-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud-libraries%2Fnextcloud-logger/lists"}