{"id":21749085,"url":"https://github.com/veeso/qmlog","last_synced_at":"2026-04-24T21:31:42.589Z","repository":{"id":104339614,"uuid":"222084185","full_name":"veeso/QMLog","owner":"veeso","description":"Simple QML Logger component and library","archived":false,"fork":false,"pushed_at":"2019-11-20T15:17:25.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T20:13:44.133Z","etag":null,"topics":["logger","logging-library","qml","qt","qt5","qtquick"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/veeso.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"veeso","ko_fi":"veeso"}},"created_at":"2019-11-16T10:42:02.000Z","updated_at":"2022-07-16T17:05:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"58480397-377c-42f7-a775-4325fb59bb8e","html_url":"https://github.com/veeso/QMLog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/veeso/QMLog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2FQMLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2FQMLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2FQMLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2FQMLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veeso","download_url":"https://codeload.github.com/veeso/QMLog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veeso%2FQMLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","logging-library","qml","qt","qt5","qtquick"],"created_at":"2024-11-26T08:16:21.236Z","updated_at":"2026-04-24T21:31:42.585Z","avatar_url":"https://github.com/veeso.png","language":"C++","funding_links":["https://github.com/sponsors/veeso","https://ko-fi.com/veeso"],"categories":[],"sub_categories":[],"readme":"# QMLog\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![HitCount](http://hits.dwyl.io/ChristianVisintin/QMLog.svg)](http://hits.dwyl.io/ChristianVisintin/QMLog) [![Stars](https://img.shields.io/github/stars/ChristianVisintin/QMLog.svg)](https://github.com/ChristianVisintin/QMLog) [![Issues](https://img.shields.io/github/issues/ChristianVisintin/QMLog.svg)](https://github.com/ChristianVisintin/QMLog/issues) [![Build](https://api.travis-ci.org/ChristianVisintin/QMLog.svg?branch=master)](https://travis-ci.org/ChristianVisintin/QMLog)\n\nDeveloped by *Christian Visintin*\n\nCurrent Version 0.1.1 (20/11/2019)\n\n---\n\n- [QMLog](#qmlog)\n  - [Introduction](#introduction)\n  - [Build instructions](#build-instructions)\n    - [With QtCreator](#with-qtcreator)\n    - [With Qmake](#with-qmake)\n  - [Implementation](#implementation)\n  - [Changelog](#changelog)\n  - [License](#license)\n\n---\n\n## Introduction\n\nQMLog is a simple QML logging module. Its main features are:\n\n- 5 log levels\n- Custom log format\n- Custom date format\n- Extremely easy to use\n- Possibility both to log to file and to console\n\n## Build instructions\n\n### With QtCreator\n\nUsing qtcreator just open qmlog project and build it, eventually install the QMLog module in your Qt directory.\n\n### With Qmake\n\nTo build QMLog follow these steps:\n\n1. ```cd qmlog```\n2. ```mkdir build/```\n3. ```qmake ..```\n4. ```make```\n5. ```make install```\n\n## Implementation\n\nOnce you've installed QMLog, follow these steps to implement QMLogger in your application\n\n1. Import QTLogger in your main file (or anywhere you want)\n\n```qml\nimport QMLogger 0.1\n```\n\n2. Create a QMLogger in your Item\n\n```qml\nQMLogger {\n  id: logger;\n  logFile: \"/tmp/qmlogger.log\";\n  toConsole: true;\n  logLevel: \"INFO\";\n  dateFormat: \"yyyy-MM-dd hh:mm:ss\";\n  logFormat: \"${DATETIME} [${LEVEL}] ${COMPONENT}: ${MESSAGE}\";\n  truncateFile: false;\n  onLogError: {\n    console.log(\"Could not log message: \", error);\n  }\n}\n```\n\n- **logFile**: specify the log file location\n- **toConsole**: indicates whether to log messages to console too\n- **logLevel**: indicates the log level (\"DEBUG\"/\"INFO\"/\"WARN\"/\"ERROR\"/\"CRITICAL\")\n- **dateFormat**: Indicates the date format. The date format follows the following one \u003chttps://doc.qt.io/qt-5/qdatetime.html#toString\u003e\n- **logFormat**: The log message format. The format is made up of keywords (${}) which are replaced during the write operation. The available keywords are:\n  - DATETIME: the date time string, serialized as specified in dateFormat\n  - LEVEL: the log level string associated to this message\n  - COMPONENT: the component which issued the log write\n  - MESSAGE: the log message\n- **truncateFile**: indicates whether the log file should be truncated at application start\n- **onLogError**: an handler in case of log error signal is raised by the QMLogger.\n\n3. Log content\n\nOnce you've configured your logger, from any logger's sibling item (or one of its children) you can log a message calling a log function:\n\n```qml\nlogger.debug(\"Component foo\", \"This is a debug message\");\nlogger.info(\"Component bar\", \"This is an info message\");\nlogger.warn(\"Component foo\", \"This is a warn message\");\nlogger.error(\"Component bar\", \"this is an error message\");\nlogger.critical(\"Component foo\", \"This is a critical error message\");\n```\n\n## Changelog\n\n### 0.1.1 (20/11/2019)\n\n- Don't log to file if file is unset\n- console changed to 'toConsole'\n\n## License\n\nLicensed under the GNU GPLv3 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n\u003chttp://www.gnu.org/licenses/gpl-3.0.txt\u003e\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nYou can read the entire license [HERE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fqmlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveeso%2Fqmlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveeso%2Fqmlog/lists"}